Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / shells / hilbish / default.nix
blobf5450e1da5c3240af1e406f5fb11927f7a1d8fb9
1 { lib, buildGoModule, fetchFromGitHub }:
3 buildGoModule rec {
4   pname = "hilbish";
5   version = "2.1.2";
7   src = fetchFromGitHub {
8     owner = "Rosettea";
9     repo = "Hilbish";
10     rev = "v${version}";
11     hash = "sha256-OEuriFnVDS0POXoPeUk4IcLtV3JAMLDM2apDxmjg5cQ=";
12     fetchSubmodules = true;
13   };
15   subPackages = [ "." ];
17   vendorHash = "sha256-Kiy1JR3X++naY2XNLpnGujrNQt7qlL0zxv8E96cHmHo=";
19   ldflags = [
20     "-s"
21     "-w"
22     "-X main.dataDir=${placeholder "out"}/share/hilbish"
23   ];
25   postInstall = ''
26     mkdir -p "$out/share/hilbish"
28     cp .hilbishrc.lua $out/share/hilbish/
29     cp -r docs -t $out/share/hilbish/
30     cp -r libs -t $out/share/hilbish/
31     cp -r nature $out/share/hilbish/
32   '';
34   meta = with lib; {
35     description = "An interactive Unix-like shell written in Go";
36     changelog = "https://github.com/Rosettea/Hilbish/releases/tag/v${version}";
37     homepage = "https://github.com/Rosettea/Hilbish";
38     maintainers = with maintainers; [ moni ];
39     license = licenses.mit;
40   };