diff options
Diffstat (limited to 'pkgs/tools/security/pinentry/mac.nix')
-rw-r--r-- | pkgs/tools/security/pinentry/mac.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/tools/security/pinentry/mac.nix b/pkgs/tools/security/pinentry/mac.nix index 1c3b87cd9f0..27917ffbbf1 100644 --- a/pkgs/tools/security/pinentry/mac.nix +++ b/pkgs/tools/security/pinentry/mac.nix @@ -1,7 +1,8 @@ -{ stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }: +{ lib, stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }: stdenv.mkDerivation { - name = "pinentry-mac-0.9.4"; + pname = "pinentry-mac"; + version = "0.9.4"; src = fetchFromGitHub { owner = "matthewbauer"; @@ -13,6 +14,12 @@ stdenv.mkDerivation { nativeBuildInputs = [ xcbuildHook ]; buildInputs = [ libiconv ncurses Cocoa ]; + preBuild = '' + # Only build for what we care about (also allows arm64) + substituteInPlace pinentry-mac.xcodeproj/project.pbxproj \ + --replace "i386 x86_64 ppc" "${stdenv.targetPlatform.darwinArch}" + ''; + installPhase = '' mkdir -p $out/Applications mv Products/Release/pinentry-mac.app $out/Applications @@ -24,8 +31,8 @@ stdenv.mkDerivation { meta = { description = "Pinentry for GPG on Mac"; - license = stdenv.lib.licenses.gpl2Plus; + license = lib.licenses.gpl2Plus; homepage = "https://github.com/GPGTools/pinentry-mac"; - platforms = stdenv.lib.platforms.darwin; + platforms = lib.platforms.darwin; }; } |