lol

pinentry_mac: fix the build with `sandbox = true` (#431236)

authored by

Emily and committed by
GitHub
200a9164 3f566362

+28 -5
+21
pkgs/tools/security/pinentry/fix-with-xcbuild-plistbuddy.patch
··· 1 + diff --git a/macosx/copyInfoPlist.sh b/macosx/copyInfoPlist.sh 2 + index f366665153..dfd9511e79 100755 3 + --- a/macosx/copyInfoPlist.sh 4 + +++ b/macosx/copyInfoPlist.sh 5 + @@ -20,9 +20,10 @@ 6 + cp "$1" "$dest" || exit 1 7 + 8 + 9 + -/usr/libexec/PlistBuddy \ 10 + - -c "Set CommitHash '${COMMIT_HASH:--}'" \ 11 + - -c "Set BuildNumber '${BUILD_NUMBER:-0}'" \ 12 + - -c "Set CFBundleVersion '${BUILD_VERSION:-0n}'" \ 13 + - -c "Set CFBundleShortVersionString '$VERSION'" \ 14 + - "$dest" || exit 1 15 + +PlistBuddy "$dest" <<EOF || exit 1 16 + + Set CommitHash "${COMMIT_HASH:--}" 17 + + Set BuildNumber "${BUILD_NUMBER:-0}" 18 + + Set CFBundleVersion "${BUILD_VERSION:-0n}" 19 + + Set CFBundleShortVersionString "$VERSION" 20 + + Save 21 + +EOF
+7 -5
pkgs/tools/security/pinentry/mac.nix
··· 7 7 libgpg-error, 8 8 makeBinaryWrapper, 9 9 texinfo, 10 + xcbuild, 10 11 common-updater-scripts, 11 12 writers, 12 13 }: ··· 27 28 28 29 patches = [ 29 30 ./gettext-0.25.patch 31 + 32 + # Fix the build with xcbuild’s inferior `PlistBuddy(8)`. 33 + ./fix-with-xcbuild-plistbuddy.patch 30 34 ]; 31 35 32 36 # use pregenerated nib files because generating them requires XCode ··· 38 42 cp '${lib.getDev libassuan}/share/aclocal/libassuan.m4' m4/libassuan.m4 39 43 ''; 40 44 41 - # Unfortunately, PlistBuddy from xcbuild is not compatible enough pinentry-mac’s build process. 42 - sandboxProfile = '' 43 - (allow process-exec (literal "/usr/libexec/PlistBuddy")) 44 - ''; 45 - 46 45 strictDeps = true; 47 46 nativeBuildInputs = [ 48 47 autoreconfHook 49 48 makeBinaryWrapper 50 49 texinfo 50 + 51 + # for `PlistBuddy(8)` 52 + xcbuild 51 53 ]; 52 54 53 55 configureFlags = [