2020-03-21 11:25:00 +01:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
|
2017-04-15 04:57:38 +02:00
|
|
|
|
2019-09-05 19:40:13 +02:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "ghq";
|
2020-02-23 12:19:24 +01:00
|
|
|
version = "1.1.0";
|
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-02-23 12:19:24 +01:00
|
|
|
sha256 = "1i0q9lxdxbyj0l0510cbkwkbycawrx8cxlbdrhb2p2fnk0vqnyiv";
|
2017-04-15 04:57:38 +02:00
|
|
|
};
|
|
|
|
|
2020-02-23 12:19:24 +01:00
|
|
|
modSha256 = "0hlbhky3c6zva9khn73n6xgq57k5p8anskxy3g2m0wzhr72cyc41";
|
2017-04-15 04:57:38 +02:00
|
|
|
|
2020-03-21 11:25:00 +01:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
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";
|
2020-02-23 12:19:24 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|