diff options
author | midchildan <git@midchildan.org> | 2022-06-04 16:03:02 +0900 |
---|---|---|
committer | midchildan <git@midchildan.org> | 2022-08-14 19:15:50 +0900 |
commit | 9cad3c278999b073098e140cfe983eaf8be7659b (patch) | |
tree | bc7d0efbbfac46923289a9352c6dd90f3306c357 /pkgs/tools/security/pinentry | |
parent | 543397edb3a954229c701a88e0b55def97721cfe (diff) |
pinentry-mac: 0.9.4 -> 1.1.1.1
Diffstat (limited to 'pkgs/tools/security/pinentry')
-rw-r--r-- | pkgs/tools/security/pinentry/mac.nix | 49 |
1 files changed, 35 insertions, 14 deletions
diff --git a/pkgs/tools/security/pinentry/mac.nix b/pkgs/tools/security/pinentry/mac.nix index 27917ffbbf174..fbd5a3a31f955 100644 --- a/pkgs/tools/security/pinentry/mac.nix +++ b/pkgs/tools/security/pinentry/mac.nix @@ -1,28 +1,49 @@ -{ lib, stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }: +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, libassuan +, libgpg-error +, libiconv +, texinfo +, Cocoa +}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "pinentry-mac"; - version = "0.9.4"; + version = "1.1.1.1"; src = fetchFromGitHub { - owner = "matthewbauer"; - repo = "pinentry-mac"; - rev = "6dfef256c8ea32d642fea847f27d800f024cf51e"; - sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83"; + owner = "GPGTools"; + repo = "pinentry"; + rev = "v${version}"; + sha256 = "sha256-QnDuqFrI/U7aZ5WcOCp5vLE+w59LVvDGOFNQy9fSy70="; }; - nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ libiconv ncurses Cocoa ]; + postPatch = '' + substituteInPlace macosx/Makefile.am --replace ibtool /usr/bin/ibtool + ''; + + nativeBuildInputs = [ autoreconfHook texinfo ]; + buildInputs = [ libassuan libgpg-error libiconv Cocoa ]; + + configureFlags = [ "--enable-maintainer-mode" "--disable-ncurses" ]; - 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}" + # This is required to let ibtool run. + sandboxProfile = '' + (allow process-exec + (literal "/usr/bin/ibtool") + (regex "/Xcode.app/Contents/Developer/usr/bin/ibtool") + (regex "/Xcode.app/Contents/Developer/usr/bin/xcodebuild") + (literal "/usr/libexec/PlistBuddy")) + (allow file-read*) + (deny file-read* (subpath "/usr/local") (with no-log)) + (allow file-write* (subpath "/private/var/folders")) ''; installPhase = '' mkdir -p $out/Applications - mv Products/Release/pinentry-mac.app $out/Applications + mv macosx/pinentry-mac.app $out/Applications ''; passthru = { |