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

34 lines
741 B
Nix
Raw Normal View History

2017-04-15 02:57:38 +00:00
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "ghq";
2019-04-28 19:34:00 +00:00
version = "0.10.2";
2017-04-15 02:57:38 +00:00
goPackagePath = "github.com/motemen/ghq";
src = fetchFromGitHub {
owner = "motemen";
repo = "ghq";
rev = "v${version}";
2019-04-28 19:34:00 +00:00
sha256 = "1i7zmgv7760nrw8sayag90b8vvmbsiifgiqki5s3gs3ldnvlki5w";
2017-04-15 02:57:38 +00:00
};
goDeps = ./deps.nix;
buildFlagsArray = ''
-ldflags=
-X=main.Version=${version}
'';
postInstall = ''
install -m 444 -D ${src}/zsh/_ghq $bin/share/zsh/site-functions/_ghq
'';
meta = {
description = "Remote repository management made easy";
homepage = https://github.com/motemen/ghq;
maintainers = with stdenv.lib.maintainers; [ sigma ];
license = stdenv.lib.licenses.mit;
};
}