nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix

32 lines
841 B
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub }:
2017-04-15 04:57:38 +02:00
buildGoModule rec {
pname = "ghq";
2020-06-26 11:22:04 +02:00
version = "1.1.2";
2017-04-15 04:57:38 +02:00
src = fetchFromGitHub {
2020-02-23 12:19:24 +01:00
owner = "x-motemen";
2017-04-15 04:57:38 +02:00
repo = "ghq";
rev = "v${version}";
2020-06-26 11:22:04 +02:00
sha256 = "1qzrycmd26f4q36z3rblfxp7jngqgmspb9385vpfwv9laiw3sqrg";
2017-04-15 04:57:38 +02:00
};
2020-06-26 11:22:04 +02:00
vendorSha256 = "0x347ljj9q3zi0zf8x13dhvsydv9vg4qc5l1kc2y56v0w8hlb4p7";
2017-04-15 04:57:38 +02:00
buildFlagsArray = ''
-ldflags=
-X=main.Version=${version}
'';
postInstall = ''
2020-02-23 12:19:24 +01:00
install -m 444 -D ${src}/misc/zsh/_ghq $out/share/zsh/site-functions/_ghq
install -m 444 -D ${src}/misc/bash/_ghq $out/share/bash-completion/completions/_ghq
2017-04-15 04:57:38 +02:00
'';
meta = {
description = "Remote repository management made easy";
homepage = "https://github.com/x-motemen/ghq";
2017-04-15 04:57:38 +02:00
maintainers = with stdenv.lib.maintainers; [ sigma ];
license = stdenv.lib.licenses.mit;
};
}