Skip to content

Commit

Permalink
Merge pull request #114893 from bobrik/ivan/pinentry-mac-aarch64
Browse files Browse the repository at this point in the history
pinentry_mac: make it compile on arm64
  • Loading branch information
SuperSandro2000 authored Mar 6, 2021
2 parents f8441c6 + 4aff0e5 commit 71fa142
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pkgs/tools/security/pinentry/mac.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,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
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7171,7 +7171,7 @@ in

pinentry_mac = callPackage ../tools/security/pinentry/mac.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
xcbuildHook = xcbuild6Hook;
xcbuildHook = if stdenv.targetPlatform.isAarch64 then xcbuildHook else xcbuild6Hook;
};

pingtcp = callPackage ../tools/networking/pingtcp { };
Expand Down

0 comments on commit 71fa142

Please sign in to comment.