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

34 lines
751 B
Nix
Raw Normal View History

2017-04-15 04:57:38 +02:00
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "ghq-${version}";
2019-04-28 21:34:00 +02:00
version = "0.10.2";
2017-04-15 04:57:38 +02:00
goPackagePath = "github.com/motemen/ghq";
src = fetchFromGitHub {
owner = "motemen";
repo = "ghq";
rev = "v${version}";
2019-04-28 21:34:00 +02:00
sha256 = "1i7zmgv7760nrw8sayag90b8vvmbsiifgiqki5s3gs3ldnvlki5w";
2017-04-15 04:57:38 +02: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;
};
}