2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
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";
|
2021-02-28 13:54:28 +01:00
|
|
|
version = "1.1.7";
|
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}";
|
2021-02-28 13:54:28 +01:00
|
|
|
sha256 = "sha256-kEs844gj1/PW7Kkpn1tvxfruznRIh2pjHCoSWGF1upQ=";
|
2017-04-15 04:57:38 +02:00
|
|
|
};
|
|
|
|
|
2021-02-25 11:07:02 +01:00
|
|
|
vendorSha256 = "sha256-5Eth9v98z1gxf1Fz5Lbn2roX7dSBmA7GRzg8uvT0hTI=";
|
2017-04-15 04:57:38 +02:00
|
|
|
|
2020-08-04 02:26:27 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
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-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/x-motemen/ghq";
|
2021-01-15 14:21:58 +01:00
|
|
|
maintainers = with lib.maintainers; [ sigma ];
|
|
|
|
license = lib.licenses.mit;
|
2017-04-15 04:57:38 +02:00
|
|
|
};
|
2020-07-31 05:58:04 +02:00
|
|
|
}
|