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

34 lines
750 B
Nix
Raw Normal View History

2017-04-15 03:57:38 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "ghq-${version}";
version = "0.7.4";
goPackagePath = "github.com/motemen/ghq";
src = fetchFromGitHub {
owner = "motemen";
repo = "ghq";
rev = "v${version}";
sha256 = "0x2agr7why8mcjhq2j8kh8d0gbwx2333zgf1ribc9fn14ryas1j2";
};
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;
};
}