Merge pull request #171836 from ncfavier/escape-wrapper-args
Fix wrapper arguments escaping
This commit is contained in:
commit
eae1669de5
18 changed files with 28 additions and 24 deletions
|
@ -39,7 +39,7 @@ bundlerApp {
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/image_optim \
|
wrapProgram $out/bin/image_optim \
|
||||||
--prefix PATH : ${makeBinPath optionalDepsPath}
|
--prefix PATH : ${lib.escapeShellArg (makeBinPath optionalDepsPath)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = bundlerUpdateScript "image_optim";
|
passthru.updateScript = bundlerUpdateScript "image_optim";
|
||||||
|
|
|
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
preFixup = optionalString (tiffSupport || jpgSupport) ''
|
preFixup = optionalString (tiffSupport || jpgSupport) ''
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--prefix PATH : ${runtimePath}
|
--prefix PATH : ${lib.escapeShellArg runtimePath}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--prefix PURPLE_PLUGIN_PATH : ${pidgin.makePluginPath plugins}
|
--prefix PURPLE_PLUGIN_PATH : ${lib.escapeShellArg (pidgin.makePluginPath plugins)}
|
||||||
${lib.concatMapStringsSep " " (p: p.wrapArgs or "") plugins}
|
${lib.concatMapStringsSep " " (p: p.wrapArgs or "") plugins}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -44,7 +44,7 @@ python3Packages.buildPythonApplication rec {
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
makeWrapperArgs = ["--prefix PATH : ${wrapperPath}"];
|
makeWrapperArgs = ["--prefix PATH : ${lib.escapeShellArg wrapperPath}"];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make DESTDIR=$out install
|
make DESTDIR=$out install
|
||||||
|
|
|
@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
|
||||||
--add-flags "-cp $out/share/java/jameica.jar:$out/share/jameica-${version}/* ${
|
--add-flags "-cp $out/share/java/jameica.jar:$out/share/jameica-${version}/* ${
|
||||||
lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread''
|
lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread''
|
||||||
} de.willuhn.jameica.Main" \
|
} de.willuhn.jameica.Main" \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \
|
--prefix LD_LIBRARY_PATH : ${lib.escapeShellArg (lib.makeLibraryPath buildInputs)} \
|
||||||
--chdir "$out/share/java/"
|
--chdir "$out/share/java/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ in stdenv.mkDerivation {
|
||||||
done
|
done
|
||||||
# Needed for at least the remote plugin server
|
# Needed for at least the remote plugin server
|
||||||
for file in $out/bin/*; do
|
for file in $out/bin/*; do
|
||||||
wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${extraPackagesSearchPath}
|
wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${lib.escapeShellArg extraPackagesSearchPath}
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
# Make custom kernels avaible from qucs-s
|
# Make custom kernels avaible from qucs-s
|
||||||
gappsWrapperArgs+=(--prefix PATH ":" ${lib.makeBinPath kernels})
|
gappsWrapperArgs+=(--prefix PATH ":" ${lib.escapeShellArg (lib.makeBinPath kernels)})
|
||||||
'';
|
'';
|
||||||
|
|
||||||
QTDIR=qt4;
|
QTDIR=qt4;
|
||||||
|
|
|
@ -17,7 +17,7 @@ in symlinkJoin {
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/vdr \
|
wrapProgram $out/bin/vdr \
|
||||||
--add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
|
--add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
|
||||||
--prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins}
|
--prefix XINE_PLUGIN_PATH ":" ${lib.escapeShellArg (makeXinePluginPath requiredXinePlugins)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with vdr.meta; {
|
meta = with vdr.meta; {
|
||||||
|
|
|
@ -76,5 +76,5 @@ in runCommand podman.name {
|
||||||
ln -s ${podman-unwrapped}/share $out/share
|
ln -s ${podman-unwrapped}/share $out/share
|
||||||
makeWrapper ${podman-unwrapped}/bin/podman $out/bin/podman \
|
makeWrapper ${podman-unwrapped}/bin/podman $out/bin/podman \
|
||||||
--set CONTAINERS_HELPER_BINARY_DIR ${helpersBin}/bin \
|
--set CONTAINERS_HELPER_BINARY_DIR ${helpersBin}/bin \
|
||||||
--prefix PATH : ${binPath}
|
--prefix PATH : ${lib.escapeShellArg binPath}
|
||||||
''
|
''
|
||||||
|
|
|
@ -28,17 +28,21 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = optional (contains_any scripts perlscripts) perl;
|
buildInputs = optional (contains_any scripts perlscripts) perl;
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = optionalString (elem "bandwidth" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/bandwidth \
|
wrapProgram $out/libexec/i3blocks/bandwidth \
|
||||||
--prefix PATH : ${makeBinPath (optional (elem "bandwidth" scripts) iproute2)}
|
--prefix PATH : ${makeBinPath [ iproute2 ]}
|
||||||
|
'' + optionalString (elem "battery" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/battery \
|
wrapProgram $out/libexec/i3blocks/battery \
|
||||||
--prefix PATH : ${makeBinPath (optional (elem "battery" scripts) acpi)}
|
--prefix PATH : ${makeBinPath [ acpi ]}
|
||||||
|
'' + optionalString (elem "cpu_usage" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/cpu_usage \
|
wrapProgram $out/libexec/i3blocks/cpu_usage \
|
||||||
--prefix PATH : ${makeBinPath (optional (elem "cpu_usage" scripts) sysstat)}
|
--prefix PATH : ${makeBinPath [ sysstat ]}
|
||||||
|
'' + optionalString (elem "iface" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/iface \
|
wrapProgram $out/libexec/i3blocks/iface \
|
||||||
--prefix PATH : ${makeBinPath (optional (elem "iface" scripts) iproute2)}
|
--prefix PATH : ${makeBinPath [ iproute2 ]}
|
||||||
|
'' + optionalString (elem "volume" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/volume \
|
wrapProgram $out/libexec/i3blocks/volume \
|
||||||
--prefix PATH : ${makeBinPath (optional (elem "volume" scripts) alsa-utils)}
|
--prefix PATH : ${makeBinPath [ alsa-utils ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -7,7 +7,7 @@ stdenv.mkDerivation {
|
||||||
name = (appendToName "with-dicts" hunspell).name;
|
name = (appendToName "with-dicts" hunspell).name;
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${searchPath}
|
makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
|
||||||
'';
|
'';
|
||||||
meta = removeAttrs hunspell.meta ["outputsToInstall"];
|
meta = removeAttrs hunspell.meta ["outputsToInstall"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ stdenv.mkDerivation {
|
||||||
name = (appendToName "with-dicts" nuspell).name;
|
name = (appendToName "with-dicts" nuspell).name;
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${searchPath}
|
makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
|
||||||
'';
|
'';
|
||||||
meta = removeAttrs nuspell.meta ["outputsToInstall"];
|
meta = removeAttrs nuspell.meta ["outputsToInstall"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ let
|
||||||
${o.postInstall or ""}
|
${o.postInstall or ""}
|
||||||
mkdir -p $out/libexec
|
mkdir -p $out/libexec
|
||||||
mv $out/bin/hci $out/libexec
|
mv $out/bin/hci $out/libexec
|
||||||
makeWrapper $out/libexec/hci $out/bin/hci --prefix PATH : ${makeBinPath bundledBins}
|
makeWrapper $out/libexec/hci $out/bin/hci --prefix PATH : ${lib.escapeShellArg (makeBinPath bundledBins)}
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
(addBuildDepends [ makeWrapper ] (justStaticExecutables haskellPackages.hercules-ci-cli));
|
(addBuildDepends [ makeWrapper ] (justStaticExecutables haskellPackages.hercules-ci-cli));
|
||||||
|
|
|
@ -12,7 +12,7 @@ let
|
||||||
${o.postInstall or ""}
|
${o.postInstall or ""}
|
||||||
mkdir -p $out/libexec
|
mkdir -p $out/libexec
|
||||||
mv $out/bin/hercules-ci-agent $out/libexec
|
mv $out/bin/hercules-ci-agent $out/libexec
|
||||||
makeWrapper $out/libexec/hercules-ci-agent $out/bin/hercules-ci-agent --prefix PATH : ${makeBinPath bundledBins}
|
makeWrapper $out/libexec/hercules-ci-agent $out/bin/hercules-ci-agent --prefix PATH : ${lib.escapeShellArg (makeBinPath bundledBins)}
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
(addBuildDepends [ makeWrapper ] (justStaticExecutables haskellPackages.hercules-ci-agent));
|
(addBuildDepends [ makeWrapper ] (justStaticExecutables haskellPackages.hercules-ci-agent));
|
||||||
|
|
|
@ -37,7 +37,7 @@ stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/bin/sqitch --prefix PERL5LIB : ${perlPackages.makeFullPerlPath modules}
|
wrapProgram $out/bin/sqitch --prefix PERL5LIB : ${lib.escapeShellArg (perlPackages.makeFullPerlPath modules)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -32,9 +32,9 @@ stdenv.mkDerivation rec {
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = optionalString ffmpegSupport ''
|
||||||
wrapProgram $out/bin/navidrome \
|
wrapProgram $out/bin/navidrome \
|
||||||
--prefix PATH : ${makeBinPath (optional ffmpegSupport ffmpeg)}
|
--prefix PATH : ${makeBinPath [ ffmpeg ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests.navidrome = nixosTests.navidrome;
|
passthru.tests.navidrome = nixosTests.navidrome;
|
||||||
|
|
|
@ -47,7 +47,7 @@ buildGoModule rec {
|
||||||
--set PUFFER_PANEL_EMAIL_TEMPLATES $out/share/pufferpanel/templates/emails.json \
|
--set PUFFER_PANEL_EMAIL_TEMPLATES $out/share/pufferpanel/templates/emails.json \
|
||||||
--set GIN_MODE release \
|
--set GIN_MODE release \
|
||||||
--set PUFFER_PANEL_WEB_FILES $out/share/pufferpanel/www \
|
--set PUFFER_PANEL_WEB_FILES $out/share/pufferpanel/www \
|
||||||
--prefix PATH : ${lib.makeBinPath pathDeps}
|
--prefix PATH : ${lib.escapeShellArg (lib.makeBinPath pathDeps)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -20,7 +20,7 @@ symlinkJoin {
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
for i in bin/emoji-picker libexec/ibus-{setup,engine}-typing-booster; do
|
for i in bin/emoji-picker libexec/ibus-{setup,engine}-typing-booster; do
|
||||||
wrapProgram "$out/$i" \
|
wrapProgram "$out/$i" \
|
||||||
--prefix NIX_HUNSPELL_DIRS : ${hunspellDirs}
|
--prefix NIX_HUNSPELL_DIRS : ${lib.escapeShellArg hunspellDirs}
|
||||||
done
|
done
|
||||||
|
|
||||||
sed -i -e "s,${typing-booster},$out," $out/share/ibus/component/typing-booster.xml
|
sed -i -e "s,${typing-booster},$out," $out/share/ibus/component/typing-booster.xml
|
||||||
|
|
Loading…
Reference in a new issue