Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / version-management / ghq / default.nix
blob80704e49a208a52dbeae531a7a3de80f6692deb0
1 { lib, buildGoModule, fetchFromGitHub }:
3 buildGoModule rec {
4   pname = "ghq";
5   version = "1.4.2";
7   src = fetchFromGitHub {
8     owner = "x-motemen";
9     repo = "ghq";
10     rev = "v${version}";
11     sha256 = "sha256-ggTx5Kz9cRqOqxxzERv4altf7m1GlreGgOiYCnHyJks=";
12   };
14   vendorHash = "sha256-6ZDvU3RQ/1M4DZMFOaQsEuodldB8k+2thXNhvZlVQEg=";
16   doCheck = false;
18   ldflags = [
19     "-X=main.Version=${version}"
20   ];
22   postInstall = ''
23     install -m 444 -D ${src}/misc/zsh/_ghq $out/share/zsh/site-functions/_ghq
24     install -m 444 -D ${src}/misc/bash/_ghq $out/share/bash-completion/completions/_ghq
25   '';
27   meta = {
28     description = "Remote repository management made easy";
29     homepage = "https://github.com/x-motemen/ghq";
30     maintainers = with lib.maintainers; [ sigma ];
31     license = lib.licenses.mit;
32   };