gitAndTools.gh: fix build on darwin

This commit is contained in:
Mario Rodas 2020-03-18 21:21:21 -05:00
parent 9a7f11e361
commit a51275f3b5
No known key found for this signature in database
GPG Key ID: 325649BCA6D53027
2 changed files with 6 additions and 3 deletions

View File

@ -30,7 +30,9 @@ let
diff-so-fancy = callPackage ./diff-so-fancy { };
gh = callPackage ./gh { };
gh = callPackage ./gh {
inherit (darwin.apple_sdk.frameworks) Security;
};
ghq = callPackage ./ghq { };

View File

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
{ stdenv, fetchFromGitHub, buildGoModule, installShellFiles, Security }:
buildGoModule rec {
pname = "gh";
@ -20,6 +20,7 @@ buildGoModule rec {
subPackages = [ "cmd/gh" ];
nativeBuildInputs = [ installShellFiles ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/gh completion -s $shell > gh.$shell
@ -27,7 +28,7 @@ buildGoModule rec {
done
'';
meta = with lib; {
meta = with stdenv.lib; {
description = "GitHub CLI tool";
homepage = "https://cli.github.com/";
license = licenses.mit;