Merge #229154: staging: make wrapProgram<Type> use the right wrapper

...into staging
This commit is contained in:
Vladimír Čunát 2023-05-01 10:17:18 +02:00
commit 50983f16a3
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
3 changed files with 10 additions and 3 deletions

View File

@ -67,7 +67,7 @@ wrapProgramBinary() {
hidden="${hidden}_"
done
mv "$prog" "$hidden"
makeWrapper "$hidden" "$prog" --inherit-argv0 "${@:2}"
makeBinaryWrapper "$hidden" "$prog" --inherit-argv0 "${@:2}"
}
# Generate source code for the wrapper in such a way that the wrapper inputs

View File

@ -217,5 +217,5 @@ wrapProgramShell() {
hidden="${hidden}_"
done
mv "$prog" "$hidden"
makeWrapper "$hidden" "$prog" --inherit-argv0 "${@:2}"
makeShellWrapper "$hidden" "$prog" --inherit-argv0 "${@:2}"
}

View File

@ -53,11 +53,18 @@ in
CXXFLAGS = lib.optionalString (stdenv.isDarwin && withQt) "-std=c++11";
# we'll wrap things ourselves
dontWrapGApps = true;
dontWrapQtApps = true;
# binary wrappers don't support --run
postInstall = lib.optionalString withX ''
wrapProgram $out/bin/gnuplot \
wrapProgramShell $out/bin/gnuplot \
--prefix PATH : '${gnused}/bin' \
--prefix PATH : '${coreutils}/bin' \
--prefix PATH : '${fontconfig.bin}/bin' \
"''${gappsWrapperArgs[@]}" \
"''${qtWrapperArgs[@]}" \
--run '. ${./set-gdfontpath-from-fontconfig.sh}'
'';