From 69d879dec3bdc4677701b2953ab3b70df6d69022 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 25 Mar 2024 04:20:00 +0000 Subject: [PATCH] pinentry_mac: fix mainProgram name The `lib.getExe` doesn't allow a nested path in the `mainProgram` attribute. --- pkgs/tools/security/pinentry/mac.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/pinentry/mac.nix b/pkgs/tools/security/pinentry/mac.nix index 4620aedecc75..8e808e18edd3 100644 --- a/pkgs/tools/security/pinentry/mac.nix +++ b/pkgs/tools/security/pinentry/mac.nix @@ -5,6 +5,7 @@ , libassuan , libgpg-error , libiconv +, makeBinaryWrapper , texinfo , common-updater-scripts , writers @@ -37,14 +38,17 @@ stdenv.mkDerivation rec { (allow process-exec (literal "/usr/libexec/PlistBuddy")) ''; - nativeBuildInputs = [ autoreconfHook texinfo ]; + nativeBuildInputs = [ autoreconfHook makeBinaryWrapper texinfo ]; buildInputs = [ libassuan libgpg-error libiconv Cocoa ]; configureFlags = [ "--enable-maintainer-mode" "--disable-ncurses" ]; installPhase = '' - mkdir -p $out/Applications + mkdir -p $out/Applications $out/bin mv macosx/pinentry-mac.app $out/Applications + + # Compatibility with `lib.getExe` + makeWrapper $out/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac $out/bin/pinentry-mac ''; enableParallelBuilding = true; @@ -85,6 +89,6 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl2Plus; homepage = "https://github.com/GPGTools/pinentry-mac"; platforms = lib.platforms.darwin; - mainProgram = passthru.binaryPath; + mainProgram = "pinentry-mac"; }; }