git.iko.soy/typeable/nixpkgs
on master help sign in
gitAndTools.gh: init at 0.5.3
commiteb957383b772039deb6f3f7e5968ea7134c24710 authorzowoq <59103226+zowoq@users.noreply.github.com> dateTue 4 Feb 2020, 12:15 (7 years ago) parent3dc9c1b
2 files changed+38
pkgs/applications/version-management/git-and-tools/default.nix+2 pkgs/applications/version-management/git-and-tools/gh/default.nix+36
pkgs/applications/version-management/git-and-tools/default.nix+2
@@ -28,6 +28,8 @@ let
2828
2929 diff-so-fancy = callPackage ./diff-so-fancy { };
3030
31+ gh = callPackage ./gh { };
32+
3133 ghq = callPackage ./ghq { };
3234
3335 git = appendToName "minimal" gitBase;
pkgs/applications/version-management/git-and-tools/gh/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
2+
3+buildGoModule rec {
4+ pname = "gh";
5+ version = "0.5.3";
6+
7+ src = fetchFromGitHub {
8+ owner = "cli";
9+ repo = "cli";
10+ rev = "v${version}";
11+ sha256 = "033y9bwdaj8735nmj22k8lrgkgimji7hyly9i4jyp11iaa7cgd7a";
12+ };
13+
14+ modSha256 = "0ina3m2ixkkz2fws6ifwy34pmp6kn5s3j7w40alz6vmybn2smy1h";
15+
16+ buildFlagsArray = [
17+ "-ldflags=-X github.com/cli/cli/command.Version=${version}"
18+ ];
19+
20+ subPackages = [ "cmd/gh" ];
21+
22+ nativeBuildInputs = [ installShellFiles ];
23+ postInstall = ''
24+ for shell in bash fish zsh; do
25+ $out/bin/gh completion -s $shell > gh.$shell
26+ installShellCompletion gh.$shell
27+ done
28+ '';
29+
30+ meta = with lib; {
31+ description = "GitHub CLI tool";
32+ homepage = "https://github.com/cli/cli";
33+ license = licenses.mit;
34+ maintainers = with maintainers; [ zowoq ];
35+ };
36+}