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

35 lines
862 B
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub }:
2017-04-15 02:57:38 +00:00
buildGoModule rec {
pname = "ghq";
2020-08-01 07:35:13 +00:00
version = "1.1.5";
2017-04-15 02:57:38 +00:00
src = fetchFromGitHub {
2020-02-23 11:19:24 +00:00
owner = "x-motemen";
2017-04-15 02:57:38 +00:00
repo = "ghq";
rev = "v${version}";
2020-08-01 07:35:13 +00:00
sha256 = "098fik155viylq07az7crzbgswcvhpx0hr68xpvyx0rpri792jbq";
2017-04-15 02:57:38 +00:00
};
2020-08-01 07:35:13 +00:00
vendorSha256 = "0gll132g111vn1hdmdjpkha9rbyppz0qj1ld89gwlk2mqd57jxkd";
2017-04-15 02:57:38 +00:00
doCheck = false;
2017-04-15 02:57:38 +00:00
buildFlagsArray = ''
-ldflags=
-X=main.Version=${version}
'';
postInstall = ''
2020-02-23 11:19:24 +00: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 02:57:38 +00:00
'';
meta = {
description = "Remote repository management made easy";
homepage = "https://github.com/x-motemen/ghq";
2017-04-15 02:57:38 +00:00
maintainers = with stdenv.lib.maintainers; [ sigma ];
license = stdenv.lib.licenses.mit;
};
}