diff options
author | Naïm Favier <n@monade.li> | 2022-03-14 19:06:00 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-03-19 09:46:31 +0100 |
commit | 9160044f5f05d0a4ac46f1260beb8604c15ed4fa (patch) | |
tree | baed08f4b9da8509af8f1e126c054d13a0d69ef8 /pkgs/games | |
parent | 10479e4f51ff182651ccff4a71b2a94ab93816c0 (diff) |
treewide/makeWrapper: replace `--run cd` with `--chdir`
Lay the groundwork for switching to binary wrappers by reducing uses of `--run` (which is not supported by `makeBinaryWrapper`).
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/airstrike/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/assaultcube/default.nix | 4 | ||||
-rw-r--r-- | pkgs/games/domination/default.nix | 4 | ||||
-rw-r--r-- | pkgs/games/flare/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/frogatto/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/iortcw/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/iortcw/sp.nix | 2 | ||||
-rw-r--r-- | pkgs/games/minecraft/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/mudlet/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/nanosaur/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/openjk/default.nix | 6 | ||||
-rw-r--r-- | pkgs/games/openmw/tes3mp.nix | 4 | ||||
-rw-r--r-- | pkgs/games/openra/common.nix | 2 | ||||
-rw-r--r-- | pkgs/games/otto-matic/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/runelite/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/sauerbraten/default.nix | 4 | ||||
-rw-r--r-- | pkgs/games/starsector/default.nix | 3 | ||||
-rw-r--r-- | pkgs/games/tome4/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/ut2004/wrapper.nix | 2 | ||||
-rw-r--r-- | pkgs/games/warsow/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/zod/default.nix | 4 |
21 files changed, 29 insertions, 28 deletions
diff --git a/pkgs/games/airstrike/default.nix b/pkgs/games/airstrike/default.nix index 12b485764a5b1..8441ac7a2feef 100644 --- a/pkgs/games/airstrike/default.nix +++ b/pkgs/games/airstrike/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { cp -r data airstrikerc $out/share wrapProgram $out/bin/airstrike \ - --run "cd $out/share" + --chdir "$out/share" ''; meta = with lib; { diff --git a/pkgs/games/assaultcube/default.nix b/pkgs/games/assaultcube/default.nix index 1013be2694e93..4a0951d0964cc 100644 --- a/pkgs/games/assaultcube/default.nix +++ b/pkgs/games/assaultcube/default.nix @@ -52,13 +52,13 @@ stdenv.mkDerivation rec { install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png makeWrapper $out/bin/ac_client $out/bin/${pname} \ - --run "cd $out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init" + --chdir "$out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init" fi if (test -e source/src/ac_server) then cp source/src/ac_server $bindir makeWrapper $out/bin/ac_server $out/bin/${pname}-server \ - --run "cd $out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt" + --chdir "$out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt" fi ''; diff --git a/pkgs/games/domination/default.nix b/pkgs/games/domination/default.nix index b7eae5e5acd63..8ef45b8501982 100644 --- a/pkgs/games/domination/default.nix +++ b/pkgs/games/domination/default.nix @@ -63,10 +63,10 @@ in stdenv.mkDerivation { # Reimplement the two launchers mentioned in Unix_shortcutSpec.xml with makeWrapper mkdir -p $out/bin makeWrapper ${jre}/bin/java $out/bin/domination \ - --run "cd $out/share/domination" \ + --chdir "$out/share/domination" \ --add-flags "-jar $out/share/domination/Domination.jar" makeWrapper ${jre}/bin/java $out/bin/domination-map-editor \ - --run "cd $out/share/domination" \ + --chdir "$out/share/domination" \ --add-flags "-cp $out/share/domination/Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame" install -Dm644 \ diff --git a/pkgs/games/flare/default.nix b/pkgs/games/flare/default.nix index 3567a5886055d..c849b879ea32e 100644 --- a/pkgs/games/flare/default.nix +++ b/pkgs/games/flare/default.nix @@ -11,7 +11,7 @@ buildEnv { nativeBuildInputs = [ makeWrapper ]; postBuild = '' mkdir -p $out/bin - makeWrapper $out/games/flare $out/bin/flare --run "cd $out/share/games/flare" + makeWrapper $out/games/flare $out/bin/flare --chdir "$out/share/games/flare" ''; meta = with lib; { diff --git a/pkgs/games/frogatto/default.nix b/pkgs/games/frogatto/default.nix index f987992858da9..fa6b46e0751fb 100644 --- a/pkgs/games/frogatto/default.nix +++ b/pkgs/games/frogatto/default.nix @@ -30,7 +30,7 @@ in buildEnv { postBuild = '' wrapProgram $out/bin/frogatto \ - --run "cd $out/share/frogatto" + --chdir "$out/share/frogatto" ''; meta = with lib; { diff --git a/pkgs/games/iortcw/default.nix b/pkgs/games/iortcw/default.nix index 8af3dfe31f68a..9da055acc2184 100644 --- a/pkgs/games/iortcw/default.nix +++ b/pkgs/games/iortcw/default.nix @@ -17,7 +17,7 @@ in buildEnv { # so we can launch sp from mp game and vice versa postBuild = '' for i in `find -L $out/opt/iortcw -maxdepth 1 -type f -executable`; do - makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw" + makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw" done ''; diff --git a/pkgs/games/iortcw/sp.nix b/pkgs/games/iortcw/sp.nix index fa6f73a177b20..d9faa177c17da 100644 --- a/pkgs/games/iortcw/sp.nix +++ b/pkgs/games/iortcw/sp.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { postInstall = '' for i in `find $out/opt/iortcw -maxdepth 1 -type f -executable`; do - makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw" + makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw" done ''; diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 08104310faa3d..dc4cd9087fc2c 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -139,7 +139,7 @@ stdenv.mkDerivation rec { --prefix LD_LIBRARY_PATH : ${envLibPath} \ --prefix PATH : ${lib.makeBinPath [ jre ]} \ --set JAVA_HOME ${lib.getBin jre} \ - --run "cd /tmp" \ + --chdir /tmp \ "''${gappsWrapperArgs[@]}" ''; diff --git a/pkgs/games/mudlet/default.nix b/pkgs/games/mudlet/default.nix index 46ae45b2202b3..f4ca916aa4997 100644 --- a/pkgs/games/mudlet/default.nix +++ b/pkgs/games/mudlet/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { --set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ --prefix LUA_PATH : "$NIX_LUA_PATH" \ --prefix LD_LIBRARY_PATH : "${libsForQt5.qtkeychain}/lib/" \ - --run "cd $out"; + --chdir "$out"; runHook postInstall ''; diff --git a/pkgs/games/nanosaur/default.nix b/pkgs/games/nanosaur/default.nix index d5ebee755da6a..e0001cfb7d5a8 100644 --- a/pkgs/games/nanosaur/default.nix +++ b/pkgs/games/nanosaur/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { installPhase = '' mv build $out - makeWrapper $out/Nanosaur $out/bin/Nanosaur --run "cd $out" + makeWrapper $out/Nanosaur $out/bin/Nanosaur --chdir "$out" ''; meta = with lib; { diff --git a/pkgs/games/openjk/default.nix b/pkgs/games/openjk/default.nix index d2844809eea87..1e38b37a71532 100644 --- a/pkgs/games/openjk/default.nix +++ b/pkgs/games/openjk/default.nix @@ -44,9 +44,9 @@ in stdenv.mkDerivation { mkdir -p $out/bin $out/share/applications $out/share/icons/hicolor/128x128/apps prefix=$out/opt/JediAcademy - makeWrapper $prefix/openjk.* $out/bin/jamp --run "cd $prefix" - makeWrapper $prefix/openjk_sp.* $out/bin/jasp --run "cd $prefix" - makeWrapper $prefix/openjkded.* $out/bin/openjkded --run "cd $prefix" + makeWrapper $prefix/openjk.* $out/bin/jamp --chdir "$prefix" + makeWrapper $prefix/openjk_sp.* $out/bin/jasp --chdir "$prefix" + makeWrapper $prefix/openjkded.* $out/bin/openjkded --chdir "$prefix" cp $src/shared/icons/OpenJK_Icon_128.png $out/share/icons/hicolor/128x128/apps ln -s ${jamp}/share/applications/* $out/share/applications diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index 37ad603d7cf53..b92c31663fc60 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -131,11 +131,11 @@ symlinkJoin rec { dir=\''${XDG_CONFIG_HOME:-\$HOME/.config}/openmw makeWrapper ${unwrapped}/libexec/tes3mp-browser $out/bin/tes3mp-browser \ - --run "cd $out/bin" + --chdir "$out/bin" makeWrapper ${unwrapped}/libexec/tes3mp-server $out/bin/tes3mp-server \ --run "mkdir -p $dir" \ --run "${crudini}/bin/crudini --merge $dir/${cfgFile.name} < ${cfgFile}" \ - --run "cd $out/bin" + --chdir "$out/bin" ''; } diff --git a/pkgs/games/openra/common.nix b/pkgs/games/openra/common.nix index 01bd44ee244ab..67060f9ef3883 100644 --- a/pkgs/games/openra/common.nix +++ b/pkgs/games/openra/common.nix @@ -34,7 +34,7 @@ in { --set TERM xterm makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/openra${openraSuffix} \ - --run "cd $out/lib/openra${openraSuffix}" + --chdir "$out/lib/openra${openraSuffix}" ''; packageAttrs = { diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix index e213deabe8593..5dd7f98e4569f 100644 --- a/pkgs/games/otto-matic/default.nix +++ b/pkgs/games/otto-matic/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { mkdir -p $out/share/OttoMatic mv Data $out/share/OttoMatic install -Dm755 {.,$out/bin}/OttoMatic - wrapProgram $out/bin/OttoMatic --run "cd $out/share/OttoMatic" + wrapProgram $out/bin/OttoMatic --chdir "$out/share/OttoMatic" runHook postInstall ''; diff --git a/pkgs/games/runelite/default.nix b/pkgs/games/runelite/default.nix index d342d543e2fca..39ff9c137dfb8 100644 --- a/pkgs/games/runelite/default.nix +++ b/pkgs/games/runelite/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { # RuneLite looks for `.so` files in $PWD/natives, so ensure that we set the PWD to the right place makeWrapper ${jre}/bin/java $out/bin/runelite \ - --run "cd $out" \ + --chdir "$out" \ --prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \ --add-flags "-jar $out/share/runelite/RuneLite.jar" ''; diff --git a/pkgs/games/sauerbraten/default.nix b/pkgs/games/sauerbraten/default.nix index 1d2e39d4164ec..934c590138d9e 100644 --- a/pkgs/games/sauerbraten/default.nix +++ b/pkgs/games/sauerbraten/default.nix @@ -56,9 +56,9 @@ stdenv.mkDerivation rec { ln -s $out/share/sauerbraten/cube.png $out/share/icon/sauerbraten.png makeWrapper $out/share/sauerbraten/sauer_server $out/bin/sauerbraten_server \ - --run "cd $out/share/sauerbraten" + --chdir "$out/share/sauerbraten" makeWrapper $out/share/sauerbraten/sauer_client $out/bin/sauerbraten_client \ - --run "cd $out/share/sauerbraten" \ + --chdir "$out/share/sauerbraten" \ --add-flags "-q\''${HOME}/.config/sauerbraten" runHook postInstall diff --git a/pkgs/games/starsector/default.nix b/pkgs/games/starsector/default.nix index 95fb3988f28e7..efba43e92dd4f 100644 --- a/pkgs/games/starsector/default.nix +++ b/pkgs/games/starsector/default.nix @@ -57,7 +57,8 @@ stdenv.mkDerivation rec { wrapProgram $out/starsector.sh \ --prefix PATH : ${lib.makeBinPath [ openjdk ]} \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \ - --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector; cd '"$out" + --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector' \ + --chdir "$out" ln -s $out/starsector.sh $out/bin/starsector runHook postInstall diff --git a/pkgs/games/tome4/default.nix b/pkgs/games/tome4/default.nix index 70fbebe084c78..1f148feb9320a 100644 --- a/pkgs/games/tome4/default.nix +++ b/pkgs/games/tome4/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { install -Dm755 t-engine $dir/t-engine cp -r bootstrap game $dir makeWrapper $dir/t-engine $out/bin/${pname} \ - --run "cd $dir" + --chdir "$dir" install -Dm755 ${desktop}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop substituteInPlace $out/share/applications/${pname}.desktop \ diff --git a/pkgs/games/ut2004/wrapper.nix b/pkgs/games/ut2004/wrapper.nix index bf344372933d4..cc5b0e400bc18 100644 --- a/pkgs/games/ut2004/wrapper.nix +++ b/pkgs/games/ut2004/wrapper.nix @@ -38,7 +38,7 @@ in runCommand "ut2004" { for i in ${game}/System/*-bin; do name="$(basename "$i")" makeWrapper $i $out/bin/''${name%-bin} \ - --run "cd ${game}/System" + --chdir "${game}/System" done mkdir -p $out/share/applications diff --git a/pkgs/games/warsow/default.nix b/pkgs/games/warsow/default.nix index 81c467dd9db74..007b124ba58ce 100644 --- a/pkgs/games/warsow/default.nix +++ b/pkgs/games/warsow/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin for i in ${warsow-engine}/bin/*; do - makeWrapper "$i" "$out/bin/$(basename "$i")" --run "cd $out/share/warsow" + makeWrapper "$i" "$out/bin/$(basename "$i")" --chdir "$out/share/warsow" done ''; diff --git a/pkgs/games/zod/default.nix b/pkgs/games/zod/default.nix index 6bf24ed6cb9fa..ad576b4642436 100644 --- a/pkgs/games/zod/default.nix +++ b/pkgs/games/zod/default.nix @@ -44,7 +44,7 @@ let installPhase = '' mkdir -p $out/bin install -m755 zod $out/bin/ - wrapProgram $out/bin/zod --run "cd ${zod_assets}/usr/lib/commander-zod" + wrapProgram $out/bin/zod --chdir "${zod_assets}/usr/lib/commander-zod" ''; }; zod_map_editor = stdenv.mkDerivation { @@ -56,7 +56,7 @@ let installPhase = '' mkdir -p $out/bin install -m755 zod_map_editor $out/bin - wrapProgram $out/bin/zod_map_editor --run "cd ${zod_assets}/usr/lib/commander-zod" + wrapProgram $out/bin/zod_map_editor --chdir "${zod_assets}/usr/lib/commander-zod" ''; }; zod_launcher = stdenv.mkDerivation { |