Skip to content

Commit

Permalink
gitAndTools.gh: init at 0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Feb 4, 2020
1 parent 3dc9c1b commit eb95738
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ let

diff-so-fancy = callPackage ./diff-so-fancy { };

gh = callPackage ./gh { };

ghq = callPackage ./ghq { };

git = appendToName "minimal" gitBase;
Expand Down
36 changes: 36 additions & 0 deletions pkgs/applications/version-management/git-and-tools/gh/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:

buildGoModule rec {
pname = "gh";
version = "0.5.3";

src = fetchFromGitHub {
owner = "cli";
repo = "cli";
rev = "v${version}";
sha256 = "033y9bwdaj8735nmj22k8lrgkgimji7hyly9i4jyp11iaa7cgd7a";
};

modSha256 = "0ina3m2ixkkz2fws6ifwy34pmp6kn5s3j7w40alz6vmybn2smy1h";

buildFlagsArray = [
"-ldflags=-X github.com/cli/cli/command.Version=${version}"
];

subPackages = [ "cmd/gh" ];

nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/gh completion -s $shell > gh.$shell
installShellCompletion gh.$shell
done
'';

meta = with lib; {
description = "GitHub CLI tool";
homepage = "https://github.com/cli/cli";
license = licenses.mit;
maintainers = with maintainers; [ zowoq ];
};
}

0 comments on commit eb95738

Please sign in to comment.