make-darwin-bundle: Use actual bin output

The script and the hook assume `/bin` is in `$out` but that's not always
true for a multi-output derivation.
This commit is contained in:
toonn 2022-03-10 13:27:29 +01:00
parent e5e8e1d926
commit a8d7ac1b11
No known key found for this signature in database
GPG key ID: 44FF902A66DF4576
2 changed files with 8 additions and 8 deletions

View file

@ -12,14 +12,14 @@
writeShellScript "make-darwin-bundle-${name}" (''
function makeDarwinBundlePhase() {
mkdir -p "$out/Applications/${name}.app/Contents/MacOS"
mkdir -p "$out/Applications/${name}.app/Contents/Resources"
mkdir -p "${!outputBin}/Applications/${name}.app/Contents/MacOS"
mkdir -p "${!outputBin}/Applications/${name}.app/Contents/Resources"
if [ -n "${icon}" ]; then
ln -s "${icon}" "$out/Applications/${name}.app/Contents/Resources"
ln -s "${icon}" "${!outputBin}/Applications/${name}.app/Contents/Resources"
fi
${writeDarwinBundle}/bin/write-darwin-bundle "$out" "${name}" "${exec}"
${writeDarwinBundle}/bin/write-darwin-bundle "${!outputBin}" "${name}" "${exec}"
}
preDistPhases+=" makeDarwinBundlePhase"

View file

@ -154,12 +154,12 @@ convertDesktopFile() {
local -r iconName=$(getDesktopParam "${file}" "^Icon")
local -r squircle=$(getDesktopParam "${file}" "X-macOS-SquircleIcon")
mkdir -p "$out/Applications/${name}.app/Contents/MacOS"
mkdir -p "$out/Applications/${name}.app/Contents/Resources"
mkdir -p "${!outputBin}/Applications/${name}.app/Contents/MacOS"
mkdir -p "${!outputBin}/Applications/${name}.app/Contents/Resources"
convertIconTheme "$out/Applications/${name}.app/Contents/Resources" "$sharePath" "$iconName"
convertIconTheme "${!outputBin}/Applications/${name}.app/Contents/Resources" "$sharePath" "$iconName"
write-darwin-bundle "$out" "$name" "$exec" "$iconName" "$squircle"
write-darwin-bundle "${!outputBin}" "$name" "$exec" "$iconName" "$squircle"
}
convertDesktopFiles() {