···6060 # files passed as arguments anyway, so this works well enough until the
6161 # issue is fixed.
6262 wrapProgram $out/bin/hivelytracker \
6363- --run "cd $out/share/hivelytracker"
6363+ --chdir "$out/share/hivelytracker"
64646565 # Also install the hvl2wav tool
6666 install -Dm755 hvl2wav/hvl2wav $out/bin/hvl2wav
···46464747 # AwesomeBump expects to find Core and Configs in its current directory.
4848 makeQtWrapper $d/AwesomeBump $out/bin/AwesomeBump \
4949- --run "cd $d"
4949+ --chdir "$d"
5050 '';
51515252 # $ cd Sources; qmake; make ../workdir/linux-g++-dgb-gl4/obj/glwidget.o
···3030 postFixup = ''
3131 # this is needed, because xteddy expects images to reside
3232 # in the current working directory
3333- wrapProgram $out/bin/xteddy --run "cd $out/share/images/"
3333+ wrapProgram $out/bin/xteddy --chdir "$out/share/images/"
3434 '';
35353636 meta = with lib; {
···6161 mkdir -p $out/bin
62626363 makeWrapper ${mirakurun}/bin/mirakurun-epgdump $out/bin/mirakurun-epgdump \
6464- --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
6464+ --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
6565 --prefix PATH : ${lib.makeBinPath runtimeDeps}
66666767 # XXX: The original mirakurun command uses PM2 to manage the Mirakurun
···7070 # unique to PM2 is currently being used.
7171 makeWrapper ${yarn}/bin/yarn $out/bin/mirakurun-start \
7272 --add-flags "start" \
7373- --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
7373+ --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \
7474 --prefix PATH : ${lib.makeBinPath runtimeDeps}
7575 '';
7676
+5
pkgs/build-support/setup-hooks/make-wrapper.sh
···1818# --set-default VAR VAL : like --set, but only adds VAR if not already set in
1919# the environment
2020# --unset VAR : remove VAR from the environment
2121+# --chdir DIR : change working directory (use instead of --run "cd DIR")
2122# --run COMMAND : run command before the executable
2223# --add-flags FLAGS : add FLAGS to invocation of executable
2324···126127 varName="${params[$((n + 1))]}"
127128 n=$((n + 1))
128129 echo "unset $varName" >> "$wrapper"
130130+ elif [[ "$p" == "--chdir" ]]; then
131131+ dir="${params[$((n + 1))]}"
132132+ n=$((n + 1))
133133+ echo "cd ${dir@Q}" >> "$wrapper"
129134 elif [[ "$p" == "--run" ]]; then
130135 command="${params[$((n + 1))]}"
131136 n=$((n + 1))
···1717 # so we can launch sp from mp game and vice versa
1818 postBuild = ''
1919 for i in `find -L $out/opt/iortcw -maxdepth 1 -type f -executable`; do
2020- makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw"
2020+ makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw"
2121 done
2222 '';
2323
+1-1
pkgs/games/iortcw/sp.nix
···38383939 postInstall = ''
4040 for i in `find $out/opt/iortcw -maxdepth 1 -type f -executable`; do
4141- makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw"
4141+ makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw"
4242 done
4343 '';
4444
···50505151 # RuneLite looks for `.so` files in $PWD/natives, so ensure that we set the PWD to the right place
5252 makeWrapper ${jre}/bin/java $out/bin/runelite \
5353- --run "cd $out" \
5353+ --chdir "$out" \
5454 --prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \
5555 --add-flags "-jar $out/share/runelite/RuneLite.jar"
5656 '';
···5858 --set-rpath ${libPath} \
5959 $out/bin/DisplayLinkManager
6060 wrapProgram $out/bin/DisplayLinkManager \
6161- --run "cd $out/lib/displaylink"
6161+ --chdir "$out/lib/displaylink"
62626363 # We introduce a dependency on the source file so that it need not be redownloaded everytime
6464 echo $src >> "$out/share/workspace_dependencies.pin"
+1-1
pkgs/os-specific/linux/sgx/psw/default.nix
···135135 mkdir $out/bin
136136 makeWrapper $out/aesm/aesm_service $out/bin/aesm_service \
137137 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ protobuf ]}:$out/aesm \
138138- --run "cd $out/aesm"
138138+ --chdir "$out/aesm"
139139140140 # Make sure we didn't forget to handle any files
141141 rmdir $sgxPswDir || (echo "Error: The directory $installDir still contains unhandled files: $(ls -A $installDir)" >&2 && exit 1)
···3333 # either $HOME or $PWD - so help it along by moving $PWD to 'share',
3434 # where we just copied those two directories:
3535 preFixup = ''
3636- wrapProgram "$out/bin/structure-synth" --run "cd $out/share"
3636+ wrapProgram "$out/bin/structure-synth" --chdir "$out/share"
3737 '';
38383939 meta = with lib; {