Fix: make Espanso.app on darwin

This change creates an app on darwin, as this is expected on the
platform.

authored by

Nikola Knezevic and committed by
Anderson Torres
f8cd609d 5a5f7e24

+15 -1
+15 -1
pkgs/applications/office/espanso/default.nix
··· 105 105 xdotool 106 106 ]; 107 107 108 + postPatch = lib.optionalString stdenv.isDarwin '' 109 + substituteInPlace scripts/create_bundle.sh --replace target/mac/ $out/Applications/ 110 + patchShebangs scripts/create_bundle.sh 111 + substituteInPlace espanso/src/res/macos/Info.plist \ 112 + --replace "<string>espanso</string>" "<string>${placeholder "out"}/Applications/Espanso.app/Contents/MacOS/espanso</string>" 113 + substituteInPlace espanso/src/res/macos/com.federicoterzi.espanso.plist \ 114 + --replace "<string>/Applications/Espanso.app/Contents/MacOS/espanso</string>" "<string>${placeholder "out"}/Applications/Espanso.app/Contents/MacOS/espanso</string>" \ 115 + --replace "<string>/usr/bin" "<string>${placeholder "out"}/bin:/usr/bin" 116 + substituteInPlace espanso/src/path/macos.rs espanso/src/path/linux.rs \ 117 + --replace '"/usr/local/bin/espanso"' '"${placeholder "out"}/bin/espanso"' 118 + ''; 119 + 108 120 # Some tests require networking 109 121 doCheck = false; 110 122 111 - postInstall = '' 123 + postInstall = if stdenv.isDarwin then '' 124 + EXEC_PATH=$out/bin/espanso BUILD_ARCH=current ${stdenv.shell} ./scripts/create_bundle.sh 125 + '' else '' 112 126 wrapProgram $out/bin/espanso \ 113 127 --prefix PATH : ${lib.makeBinPath ( 114 128 lib.optionals stdenv.isLinux [