lol

Merge pull request #164746 from ncfavier/makeWrapper-chdir

authored by

Doron Behar and committed by
GitHub
4a02c56a b5cad4d4

+76 -70
+1 -1
nixos/modules/services/misc/etebase-server.nix
··· 166 166 } '' 167 167 makeWrapper ${pythonEnv}/bin/etebase-server \ 168 168 $out/bin/etebase-server \ 169 - --run "cd ${cfg.dataDir}" \ 169 + --chdir ${escapeShellArg cfg.dataDir} \ 170 170 --prefix ETEBASE_EASY_CONFIG_PATH : "${configIni}" 171 171 '') 172 172 ];
+2 -2
nixos/modules/services/misc/gitlab.nix
··· 179 179 ${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \ 180 180 --set PATH '${lib.makeBinPath [ pkgs.nodejs pkgs.gzip pkgs.git pkgs.gnutar postgresqlPackage pkgs.coreutils pkgs.procps ]}:$PATH' \ 181 181 --set RAKEOPT '-f ${cfg.packages.gitlab}/share/gitlab/Rakefile' \ 182 - --run 'cd ${cfg.packages.gitlab}/share/gitlab' 182 + --chdir '${cfg.packages.gitlab}/share/gitlab' 183 183 ''; 184 184 }; 185 185 ··· 193 193 makeWrapper ${cfg.packages.gitlab.rubyEnv}/bin/rails $out/bin/gitlab-rails \ 194 194 ${concatStrings (mapAttrsToList (name: value: "--set ${name} '${value}' ") gitlabEnv)} \ 195 195 --set PATH '${lib.makeBinPath [ pkgs.nodejs pkgs.gzip pkgs.git pkgs.gnutar postgresqlPackage pkgs.coreutils pkgs.procps ]}:$PATH' \ 196 - --run 'cd ${cfg.packages.gitlab}/share/gitlab' 196 + --chdir '${cfg.packages.gitlab}/share/gitlab' 197 197 ''; 198 198 }; 199 199
+1 -1
pkgs/applications/audio/hivelytracker/default.nix
··· 60 60 # files passed as arguments anyway, so this works well enough until the 61 61 # issue is fixed. 62 62 wrapProgram $out/bin/hivelytracker \ 63 - --run "cd $out/share/hivelytracker" 63 + --chdir "$out/share/hivelytracker" 64 64 65 65 # Also install the hvl2wav tool 66 66 install -Dm755 hvl2wav/hvl2wav $out/bin/hvl2wav
+1 -1
pkgs/applications/audio/lyrebird/default.nix
··· 42 42 makeWrapperArgs = [ 43 43 "--prefix 'PATH' ':' '${lib.makeBinPath [ sox pulseaudio ]}'" 44 44 "--prefix 'PYTHONPATH' ':' '${placeholder "out"}/share/lyrebird'" 45 - "--run 'cd ${placeholder "out"}/share/lyrebird'" 45 + "--chdir '${placeholder "out"}/share/lyrebird'" 46 46 ''"''${gappsWrapperArgs[@]}"'' 47 47 ]; 48 48
+1 -1
pkgs/applications/blockchains/wasabibackend/default.nix
··· 32 32 33 33 preConfigure = '' 34 34 makeWrapperArgs+=( 35 - --run "cd $out/lib/${pname}" 35 + --chdir "$out/lib/${pname}" 36 36 ) 37 37 ''; 38 38
+1 -1
pkgs/applications/graphics/awesomebump/default.nix
··· 46 46 47 47 # AwesomeBump expects to find Core and Configs in its current directory. 48 48 makeQtWrapper $d/AwesomeBump $out/bin/AwesomeBump \ 49 - --run "cd $d" 49 + --chdir "$d" 50 50 ''; 51 51 52 52 # $ cd Sources; qmake; make ../workdir/linux-g++-dgb-gl4/obj/glwidget.o
+1 -1
pkgs/applications/graphics/foxotron/default.nix
··· 48 48 cp -R ${lib.optionalString stdenv.hostPlatform.isDarwin "Foxotron.app/Contents/MacOS/"}Foxotron \ 49 49 ../{config.json,Shaders,Skyboxes} $out/lib/foxotron/ 50 50 wrapProgram $out/lib/foxotron/Foxotron \ 51 - --run "cd $out/lib/foxotron" 51 + --chdir "$out/lib/foxotron" 52 52 ln -s $out/{lib/foxotron,bin}/Foxotron 53 53 54 54 runHook postInstall
+1 -1
pkgs/applications/graphics/unigine-valley/default.nix
··· 97 97 mkdir -p $out/bin 98 98 install -m 0755 valley $out/bin/valley 99 99 wrapProgram $out/bin/valley \ 100 - --run "cd $instdir" \ 100 + --chdir "$instdir" \ 101 101 --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath 102 102 103 103 runHook postInstall
+1 -1
pkgs/applications/misc/multibootusb/default.nix
··· 101 101 --prefix "PATH" ":" "${lib.makeBinPath runTimeDeps}" 102 102 103 103 # Finally, move to directory that contains data 104 - --run "cd $out/share/${pname}" 104 + --chdir "$out/share/${pname}" 105 105 ) 106 106 ''; 107 107
+1 -1
pkgs/applications/misc/tvbrowser/bin.nix
··· 41 41 mkdir -p $out/bin 42 42 makeWrapper ${jre}/bin/java $out/bin/${pname} \ 43 43 --add-flags "-jar $out/share/java/${pname}/${pname}.jar" \ 44 - --run "cd $out/share/java/${pname}" 44 + --chdir "$out/share/java/${pname}" 45 45 ''; 46 46 47 47 meta = with lib; {
+1 -1
pkgs/applications/misc/xteddy/default.nix
··· 30 30 postFixup = '' 31 31 # this is needed, because xteddy expects images to reside 32 32 # in the current working directory 33 - wrapProgram $out/bin/xteddy --run "cd $out/share/images/" 33 + wrapProgram $out/bin/xteddy --chdir "$out/share/images/" 34 34 ''; 35 35 36 36 meta = with lib; {
+1 -1
pkgs/applications/networking/instant-messengers/ripcord/default.nix
··· 48 48 install -Dm755 ${src}/Ripcord $out/Ripcord 49 49 patchelf --replace-needed libsodium.so.18 libsodium.so $out/Ripcord 50 50 makeQtWrapper $out/Ripcord $out/bin/ripcord \ 51 - --run "cd $out" \ 51 + --chdir "$out" \ 52 52 --set FONTCONFIG_FILE "${fontsConf}" \ 53 53 --prefix LD_LIBRARY_PATH ":" "${xorg.libXcursor}/lib" \ 54 54 --prefix QT_XKB_CONFIG_ROOT ":" "${xorg.xkeyboardconfig}/share/X11/xkb" \
+1 -1
pkgs/applications/networking/instant-messengers/torchat/default.nix
··· 26 26 cp -rf * $out/lib/torchat 27 27 makeWrapper ${python2}/bin/python $out/bin/torchat \ 28 28 --set PYTHONPATH $out/lib/torchat:$program_PYTHONPATH \ 29 - --run "cd $out/lib/torchat" \ 29 + --chdir "$out/lib/torchat" \ 30 30 --add-flags "-O $out/lib/torchat/torchat.py" 31 31 ''; 32 32
+1 -1
pkgs/applications/networking/instant-messengers/zoom-us/default.nix
··· 104 104 # Clear Qt paths to prevent tripping over "foreign" Qt resources. 105 105 # Clear Qt screen scaling settings to prevent over-scaling. 106 106 makeWrapper $out/opt/zoom/ZoomLauncher $out/bin/zoom \ 107 - --run "cd $out/opt/zoom" \ 107 + --chdir "$out/opt/zoom" \ 108 108 --unset QML2_IMPORT_PATH \ 109 109 --unset QT_PLUGIN_PATH \ 110 110 --unset QT_SCREEN_SCALE_FACTORS \
+2 -2
pkgs/applications/networking/p2p/tribler/default.nix
··· 74 74 makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \ 75 75 --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \ 76 76 --set QT_PLUGIN_PATH "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" \ 77 - --set _TRIBLERPATH $out/src \ 77 + --set _TRIBLERPATH "$out/src" \ 78 78 --set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \ 79 79 --set NO_AT_BRIDGE 1 \ 80 - --run 'cd $_TRIBLERPATH' \ 80 + --chdir "$out/src" \ 81 81 --add-flags "-O $out/src/run_tribler.py" 82 82 83 83 mkdir -p $out/share/applications $out/share/icons
+1 -1
pkgs/applications/networking/remote/rustdesk/default.nix
··· 86 86 ln -s ${libsciter}/lib/libsciter-gtk.so $out/lib/rustdesk 87 87 88 88 makeWrapper $out/lib/rustdesk/rustdesk $out/bin/rustdesk \ 89 - --run "cd $out/share" 89 + --chdir "$out/share" 90 90 91 91 cp -a $src/src/ui $out/share/src 92 92
+1 -1
pkgs/applications/office/jameica/default.nix
··· 59 59 lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread'' 60 60 } de.willuhn.jameica.Main" \ 61 61 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \ 62 - --run "cd $out/share/java/" 62 + --chdir "$out/share/java/" 63 63 ''; 64 64 65 65 meta = with lib; {
+1 -1
pkgs/applications/science/astronomy/openspace/default.nix
··· 69 69 patchelf --set-rpath $rpath:${bundle}/lib $bin 70 70 71 71 name=$(basename $bin) 72 - makeWrapper $bin $out/bin/$name --run "cd ${bundle}" 72 + makeWrapper $bin $out/bin/$name --chdir "${bundle}" 73 73 done 74 74 ''; 75 75
+1 -1
pkgs/applications/science/logic/tlaplus/toolbox.nix
··· 62 62 "$(find "$out/toolbox" -name jspawnhelper)" 63 63 64 64 makeWrapper $out/toolbox/toolbox $out/bin/tla-toolbox \ 65 - --run "set -x; cd $out/toolbox" \ 65 + --chdir "$out/toolbox" \ 66 66 --add-flags "-data ~/.tla-toolbox" \ 67 67 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}" \ 68 68 "''${gappsWrapperArgs[@]}"
+1 -1
pkgs/applications/science/misc/netlogo/default.nix
··· 37 37 38 38 # launcher with `cd` is required b/c otherwise the model library isn't usable 39 39 makeWrapper "${jre}/bin/java" "$out/bin/netlogo" \ 40 - --run "cd $out/share/netlogo/app" \ 40 + --chdir "$out/share/netlogo/app" \ 41 41 --add-flags "-jar netlogo-${version}.jar" 42 42 43 43 cp $src1 $out/share/icons/hicolor/256x256/apps/netlogo.png
+1 -1
pkgs/applications/science/robotics/sumorobot-manager/default.nix
··· 27 27 mkdir $out/bin 28 28 dos2unix $out/opt/sumorobot-manager/main.py 29 29 makeQtWrapper $out/opt/sumorobot-manager/main.py $out/bin/sumorobot-manager \ 30 - --run "cd $out/opt/sumorobot-manager" 30 + --chdir "$out/opt/sumorobot-manager" 31 31 ''; 32 32 33 33 preFixup = ''
+1 -1
pkgs/applications/video/epgstation/default.nix
··· 115 115 ln -sfT /var/lib/epgstation/thumbnail thumbnail 116 116 117 117 makeWrapper ${nodejs}/bin/npm $out/bin/epgstation \ 118 - --run "cd $out/lib/node_modules/epgstation" \ 118 + --chdir "$out/lib/node_modules/epgstation" \ 119 119 --prefix PATH : ${lib.makeBinPath runtimeDeps} \ 120 120 --set APP_ROOT_PATH "$out/lib/node_modules/epgstation" 121 121
+2 -2
pkgs/applications/video/mirakurun/default.nix
··· 61 61 mkdir -p $out/bin 62 62 63 63 makeWrapper ${mirakurun}/bin/mirakurun-epgdump $out/bin/mirakurun-epgdump \ 64 - --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ 64 + --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ 65 65 --prefix PATH : ${lib.makeBinPath runtimeDeps} 66 66 67 67 # XXX: The original mirakurun command uses PM2 to manage the Mirakurun ··· 70 70 # unique to PM2 is currently being used. 71 71 makeWrapper ${yarn}/bin/yarn $out/bin/mirakurun-start \ 72 72 --add-flags "start" \ 73 - --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ 73 + --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ 74 74 --prefix PATH : ${lib.makeBinPath runtimeDeps} 75 75 ''; 76 76
+5
pkgs/build-support/setup-hooks/make-wrapper.sh
··· 18 18 # --set-default VAR VAL : like --set, but only adds VAR if not already set in 19 19 # the environment 20 20 # --unset VAR : remove VAR from the environment 21 + # --chdir DIR : change working directory (use instead of --run "cd DIR") 21 22 # --run COMMAND : run command before the executable 22 23 # --add-flags FLAGS : add FLAGS to invocation of executable 23 24 ··· 126 127 varName="${params[$((n + 1))]}" 127 128 n=$((n + 1)) 128 129 echo "unset $varName" >> "$wrapper" 130 + elif [[ "$p" == "--chdir" ]]; then 131 + dir="${params[$((n + 1))]}" 132 + n=$((n + 1)) 133 + echo "cd ${dir@Q}" >> "$wrapper" 129 134 elif [[ "$p" == "--run" ]]; then 130 135 command="${params[$((n + 1))]}" 131 136 n=$((n + 1))
+1 -1
pkgs/development/ruby-modules/bundler-app/default.nix
··· 57 57 "--set BUNDLE_FROZEN 1 "+ 58 58 "--set GEM_HOME ${basicEnv}/${ruby.gemPath} "+ 59 59 "--set GEM_PATH ${basicEnv}/${ruby.gemPath} "+ 60 - "--run \"cd $srcdir\";\n") scripts)} 60 + "--chdir \"$srcdir\";\n") scripts)} 61 61 62 62 ${lib.optionalString installManpages '' 63 63 for section in {1..9}; do
+1 -1
pkgs/development/tools/database/sqldeveloper/default.nix
··· 62 62 63 63 makeWrapper $out/libexec/sqldeveloper/bin/sqldeveloper $out/bin/sqldeveloper \ 64 64 --set JAVA_HOME ${jdk.home} \ 65 - --run "cd $out/libexec/sqldeveloper/bin" 65 + --chdir "$out/libexec/sqldeveloper/bin" 66 66 ''; 67 67 68 68 meta = with lib; {
+1 -1
pkgs/games/airstrike/default.nix
··· 23 23 cp -r data airstrikerc $out/share 24 24 25 25 wrapProgram $out/bin/airstrike \ 26 - --run "cd $out/share" 26 + --chdir "$out/share" 27 27 ''; 28 28 29 29 meta = with lib; {
+2 -2
pkgs/games/assaultcube/default.nix
··· 52 52 install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png 53 53 54 54 makeWrapper $out/bin/ac_client $out/bin/${pname} \ 55 - --run "cd $out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init" 55 + --chdir "$out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init" 56 56 fi 57 57 58 58 if (test -e source/src/ac_server) then 59 59 cp source/src/ac_server $bindir 60 60 makeWrapper $out/bin/ac_server $out/bin/${pname}-server \ 61 - --run "cd $out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt" 61 + --chdir "$out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt" 62 62 fi 63 63 ''; 64 64
+2 -2
pkgs/games/domination/default.nix
··· 63 63 # Reimplement the two launchers mentioned in Unix_shortcutSpec.xml with makeWrapper 64 64 mkdir -p $out/bin 65 65 makeWrapper ${jre}/bin/java $out/bin/domination \ 66 - --run "cd $out/share/domination" \ 66 + --chdir "$out/share/domination" \ 67 67 --add-flags "-jar $out/share/domination/Domination.jar" 68 68 makeWrapper ${jre}/bin/java $out/bin/domination-map-editor \ 69 - --run "cd $out/share/domination" \ 69 + --chdir "$out/share/domination" \ 70 70 --add-flags "-cp $out/share/domination/Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame" 71 71 72 72 install -Dm644 \
+1 -1
pkgs/games/flare/default.nix
··· 11 11 nativeBuildInputs = [ makeWrapper ]; 12 12 postBuild = '' 13 13 mkdir -p $out/bin 14 - makeWrapper $out/games/flare $out/bin/flare --run "cd $out/share/games/flare" 14 + makeWrapper $out/games/flare $out/bin/flare --chdir "$out/share/games/flare" 15 15 ''; 16 16 17 17 meta = with lib; {
+1 -1
pkgs/games/frogatto/default.nix
··· 30 30 31 31 postBuild = '' 32 32 wrapProgram $out/bin/frogatto \ 33 - --run "cd $out/share/frogatto" 33 + --chdir "$out/share/frogatto" 34 34 ''; 35 35 36 36 meta = with lib; {
+1 -1
pkgs/games/iortcw/default.nix
··· 17 17 # so we can launch sp from mp game and vice versa 18 18 postBuild = '' 19 19 for i in `find -L $out/opt/iortcw -maxdepth 1 -type f -executable`; do 20 - makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw" 20 + makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw" 21 21 done 22 22 ''; 23 23
+1 -1
pkgs/games/iortcw/sp.nix
··· 38 38 39 39 postInstall = '' 40 40 for i in `find $out/opt/iortcw -maxdepth 1 -type f -executable`; do 41 - makeWrapper $i $out/bin/`basename $i` --run "cd $out/opt/iortcw" 41 + makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw" 42 42 done 43 43 ''; 44 44
+1 -1
pkgs/games/minecraft/default.nix
··· 139 139 --prefix LD_LIBRARY_PATH : ${envLibPath} \ 140 140 --prefix PATH : ${lib.makeBinPath [ jre ]} \ 141 141 --set JAVA_HOME ${lib.getBin jre} \ 142 - --run "cd /tmp" \ 142 + --chdir /tmp \ 143 143 "''${gappsWrapperArgs[@]}" 144 144 ''; 145 145
+1 -1
pkgs/games/mudlet/default.nix
··· 85 85 --set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ 86 86 --prefix LUA_PATH : "$NIX_LUA_PATH" \ 87 87 --prefix LD_LIBRARY_PATH : "${libsForQt5.qtkeychain}/lib/" \ 88 - --run "cd $out"; 88 + --chdir "$out"; 89 89 90 90 runHook postInstall 91 91 '';
+1 -1
pkgs/games/nanosaur/default.nix
··· 28 28 29 29 installPhase = '' 30 30 mv build $out 31 - makeWrapper $out/Nanosaur $out/bin/Nanosaur --run "cd $out" 31 + makeWrapper $out/Nanosaur $out/bin/Nanosaur --chdir "$out" 32 32 ''; 33 33 34 34 meta = with lib; {
+3 -3
pkgs/games/openjk/default.nix
··· 44 44 mkdir -p $out/bin $out/share/applications $out/share/icons/hicolor/128x128/apps 45 45 prefix=$out/opt/JediAcademy 46 46 47 - makeWrapper $prefix/openjk.* $out/bin/jamp --run "cd $prefix" 48 - makeWrapper $prefix/openjk_sp.* $out/bin/jasp --run "cd $prefix" 49 - makeWrapper $prefix/openjkded.* $out/bin/openjkded --run "cd $prefix" 47 + makeWrapper $prefix/openjk.* $out/bin/jamp --chdir "$prefix" 48 + makeWrapper $prefix/openjk_sp.* $out/bin/jasp --chdir "$prefix" 49 + makeWrapper $prefix/openjkded.* $out/bin/openjkded --chdir "$prefix" 50 50 51 51 cp $src/shared/icons/OpenJK_Icon_128.png $out/share/icons/hicolor/128x128/apps 52 52 ln -s ${jamp}/share/applications/* $out/share/applications
+2 -2
pkgs/games/openmw/tes3mp.nix
··· 131 131 dir=\''${XDG_CONFIG_HOME:-\$HOME/.config}/openmw 132 132 133 133 makeWrapper ${unwrapped}/libexec/tes3mp-browser $out/bin/tes3mp-browser \ 134 - --run "cd $out/bin" 134 + --chdir "$out/bin" 135 135 136 136 makeWrapper ${unwrapped}/libexec/tes3mp-server $out/bin/tes3mp-server \ 137 137 --run "mkdir -p $dir" \ 138 138 --run "${crudini}/bin/crudini --merge $dir/${cfgFile.name} < ${cfgFile}" \ 139 - --run "cd $out/bin" 139 + --chdir "$out/bin" 140 140 ''; 141 141 }
+1 -1
pkgs/games/openra/common.nix
··· 34 34 --set TERM xterm 35 35 36 36 makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/openra${openraSuffix} \ 37 - --run "cd $out/lib/openra${openraSuffix}" 37 + --chdir "$out/lib/openra${openraSuffix}" 38 38 ''; 39 39 40 40 packageAttrs = {
+1 -1
pkgs/games/otto-matic/default.nix
··· 27 27 mkdir -p $out/share/OttoMatic 28 28 mv Data $out/share/OttoMatic 29 29 install -Dm755 {.,$out/bin}/OttoMatic 30 - wrapProgram $out/bin/OttoMatic --run "cd $out/share/OttoMatic" 30 + wrapProgram $out/bin/OttoMatic --chdir "$out/share/OttoMatic" 31 31 32 32 runHook postInstall 33 33 '';
+1 -1
pkgs/games/runelite/default.nix
··· 50 50 51 51 # RuneLite looks for `.so` files in $PWD/natives, so ensure that we set the PWD to the right place 52 52 makeWrapper ${jre}/bin/java $out/bin/runelite \ 53 - --run "cd $out" \ 53 + --chdir "$out" \ 54 54 --prefix LD_LIBRARY_PATH : "${xorg.libXxf86vm}/lib" \ 55 55 --add-flags "-jar $out/share/runelite/RuneLite.jar" 56 56 '';
+2 -2
pkgs/games/sauerbraten/default.nix
··· 56 56 ln -s $out/share/sauerbraten/cube.png $out/share/icon/sauerbraten.png 57 57 58 58 makeWrapper $out/share/sauerbraten/sauer_server $out/bin/sauerbraten_server \ 59 - --run "cd $out/share/sauerbraten" 59 + --chdir "$out/share/sauerbraten" 60 60 makeWrapper $out/share/sauerbraten/sauer_client $out/bin/sauerbraten_client \ 61 - --run "cd $out/share/sauerbraten" \ 61 + --chdir "$out/share/sauerbraten" \ 62 62 --add-flags "-q\''${HOME}/.config/sauerbraten" 63 63 64 64 runHook postInstall
+2 -1
pkgs/games/starsector/default.nix
··· 57 57 wrapProgram $out/starsector.sh \ 58 58 --prefix PATH : ${lib.makeBinPath [ openjdk ]} \ 59 59 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \ 60 - --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector; cd '"$out" 60 + --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector' \ 61 + --chdir "$out" 61 62 ln -s $out/starsector.sh $out/bin/starsector 62 63 63 64 runHook postInstall
+1 -1
pkgs/games/tome4/default.nix
··· 52 52 install -Dm755 t-engine $dir/t-engine 53 53 cp -r bootstrap game $dir 54 54 makeWrapper $dir/t-engine $out/bin/${pname} \ 55 - --run "cd $dir" 55 + --chdir "$dir" 56 56 57 57 install -Dm755 ${desktop}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop 58 58 substituteInPlace $out/share/applications/${pname}.desktop \
+1 -1
pkgs/games/ut2004/wrapper.nix
··· 38 38 for i in ${game}/System/*-bin; do 39 39 name="$(basename "$i")" 40 40 makeWrapper $i $out/bin/''${name%-bin} \ 41 - --run "cd ${game}/System" 41 + --chdir "${game}/System" 42 42 done 43 43 44 44 mkdir -p $out/share/applications
+1 -1
pkgs/games/warsow/default.nix
··· 18 18 19 19 mkdir -p $out/bin 20 20 for i in ${warsow-engine}/bin/*; do 21 - makeWrapper "$i" "$out/bin/$(basename "$i")" --run "cd $out/share/warsow" 21 + makeWrapper "$i" "$out/bin/$(basename "$i")" --chdir "$out/share/warsow" 22 22 done 23 23 ''; 24 24
+2 -2
pkgs/games/zod/default.nix
··· 44 44 installPhase = '' 45 45 mkdir -p $out/bin 46 46 install -m755 zod $out/bin/ 47 - wrapProgram $out/bin/zod --run "cd ${zod_assets}/usr/lib/commander-zod" 47 + wrapProgram $out/bin/zod --chdir "${zod_assets}/usr/lib/commander-zod" 48 48 ''; 49 49 }; 50 50 zod_map_editor = stdenv.mkDerivation { ··· 56 56 installPhase = '' 57 57 mkdir -p $out/bin 58 58 install -m755 zod_map_editor $out/bin 59 - wrapProgram $out/bin/zod_map_editor --run "cd ${zod_assets}/usr/lib/commander-zod" 59 + wrapProgram $out/bin/zod_map_editor --chdir "${zod_assets}/usr/lib/commander-zod" 60 60 ''; 61 61 }; 62 62 zod_launcher = stdenv.mkDerivation {
+1 -1
pkgs/os-specific/linux/displaylink/default.nix
··· 58 58 --set-rpath ${libPath} \ 59 59 $out/bin/DisplayLinkManager 60 60 wrapProgram $out/bin/DisplayLinkManager \ 61 - --run "cd $out/lib/displaylink" 61 + --chdir "$out/lib/displaylink" 62 62 63 63 # We introduce a dependency on the source file so that it need not be redownloaded everytime 64 64 echo $src >> "$out/share/workspace_dependencies.pin"
+1 -1
pkgs/os-specific/linux/sgx/psw/default.nix
··· 135 135 mkdir $out/bin 136 136 makeWrapper $out/aesm/aesm_service $out/bin/aesm_service \ 137 137 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ protobuf ]}:$out/aesm \ 138 - --run "cd $out/aesm" 138 + --chdir "$out/aesm" 139 139 140 140 # Make sure we didn't forget to handle any files 141 141 rmdir $sgxPswDir || (echo "Error: The directory $installDir still contains unhandled files: $(ls -A $installDir)" >&2 && exit 1)
+2 -2
pkgs/os-specific/linux/sgx/samples/default.nix
··· 41 41 install *.so $out/lib 42 42 43 43 wrapProgram "$out/bin/app" \ 44 - --run "cd $out/lib" \ 44 + --chdir "$out/lib" \ 45 45 ${lib.optionalString (!isSimulation) 46 46 ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-psw ]}"''} 47 47 ··· 76 76 77 77 for bin in $out/bin/*; do 78 78 wrapProgram $bin \ 79 - --run "cd $out/lib" \ 79 + --chdir "$out/lib" \ 80 80 ${lib.optionalString (!isSimulation) 81 81 ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-psw ]}"''} 82 82 done
+1 -1
pkgs/servers/ombi/default.nix
··· 37 37 38 38 makeWrapper $out/share/${pname}-${version}/Ombi $out/bin/Ombi \ 39 39 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl icu ]} \ 40 - --run "cd $out/share/${pname}-${version}" 40 + --chdir "$out/share/${pname}-${version}" 41 41 ''; 42 42 43 43 passthru = {
+1 -1
pkgs/servers/plik/default.nix
··· 21 21 mv plik-*/webapp/dist $out/libexec/plikd/webapp 22 22 cp ${programs.plikd-unwrapped}/bin/plikd $out/libexec/plikd/bin/plikd 23 23 makeWrapper $out/libexec/plikd/bin/plikd $out/bin/plikd \ 24 - --run "cd $out/libexec/plikd/bin" 24 + --chdir "$out/libexec/plikd/bin" 25 25 ''; 26 26 }
+1 -1
pkgs/servers/roon-bridge/default.nix
··· 68 68 ${fixBin "${placeholder "out"}/Bridge/RoonBridgeHelper"} 69 69 70 70 mkdir -p $out/bin 71 - makeWrapper "$out/Bridge/RoonBridge" "$out/bin/RoonBridge" --run "cd $out" 71 + makeWrapper "$out/Bridge/RoonBridge" "$out/bin/RoonBridge" --chdir "$out" 72 72 73 73 runHook postInstall 74 74 '';
+2 -2
pkgs/servers/roon-server/default.nix
··· 61 61 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ alsa-lib icu66 ffmpeg openssl ]}" \ 62 62 --prefix PATH : "$dotnetDir" \ 63 63 --prefix PATH : "${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}" \ 64 - --run "cd $binDir" \ 64 + --chdir "$binDir" \ 65 65 --set DOTNET_ROOT "$dotnetDir" 66 66 ) 67 67 ''; ··· 80 80 ${wrapBin "$out/Server/RoonServer"} 81 81 82 82 mkdir -p $out/bin 83 - makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --run "cd $out" 83 + makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --chdir "$out" 84 84 85 85 # This is unused and depends on an ancient version of lttng-ust, so we 86 86 # just patch it out
+1 -1
pkgs/servers/web-apps/discourse/default.nix
··· 99 99 ${lib.concatStrings (lib.mapAttrsToList (name: value: "--set ${name} '${value}' ") runtimeEnv)} \ 100 100 --prefix PATH : ${lib.makeBinPath runtimeDeps} \ 101 101 --set RAKEOPT '-f ${discourse}/share/discourse/Rakefile' \ 102 - --run 'cd ${discourse}/share/discourse' 102 + --chdir '${discourse}/share/discourse' 103 103 ''; 104 104 105 105 rubyEnv = bundlerEnv {
+2 -2
pkgs/tools/cd-dvd/ventoy-bin/default.nix
··· 79 79 ExtendPersistentImg.sh_ventoy-extend-persistent; do 80 80 makeWrapper "$VENTOY_PATH/''${f%_*}" "$out/bin/''${f#*_}" \ 81 81 --prefix PATH : "${lib.makeBinPath buildInputs}" \ 82 - --run "cd '$VENTOY_PATH' || exit 1" 82 + --chdir "$VENTOY_PATH" 83 83 done 84 84 '' + lib.optionalString (withGtk3 || withQt5) '' 85 85 echo "${defaultGuiType}" > "$VENTOY_PATH/ventoy_gui_type" 86 86 makeWrapper "$VENTOY_PATH/VentoyGUI.$ARCH" "$out/bin/ventoy-gui" \ 87 87 --prefix PATH : "${lib.makeBinPath buildInputs}" \ 88 - --run "cd '$VENTOY_PATH' || exit 1" 88 + --chdir "$VENTOY_PATH" 89 89 '' + lib.optionalString (!withGtk3) '' 90 90 rm "$out"/share/ventoy/tool/"$ARCH"/Ventoy2Disk.gtk3 91 91 '' + lib.optionalString (!withQt5) ''
+1 -1
pkgs/tools/graphics/snapdragon-profiler/default.nix
··· 57 57 --suffix PATH : ${lib.makeBinPath [ jre androidenv.androidPkgs_9_0.platform-tools coreutils ]} \ 58 58 --prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \ 59 59 --suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //') \ 60 - --run "cd $out/lib/snapdragon-profiler" # Fixes themes not loading correctly 60 + --chdir "$out/lib/snapdragon-profiler" # Fixes themes not loading correctly 61 61 62 62 wrestool -x -t 14 SnapdragonProfiler.exe > snapdragon-profiler.ico 63 63 icotool -x -i 1 -o $out/share/icons/hicolor/16x16/apps/snapdragon-profiler.png snapdragon-profiler.ico
+1 -1
pkgs/tools/graphics/structure-synth/default.nix
··· 33 33 # either $HOME or $PWD - so help it along by moving $PWD to 'share', 34 34 # where we just copied those two directories: 35 35 preFixup = '' 36 - wrapProgram "$out/bin/structure-synth" --run "cd $out/share" 36 + wrapProgram "$out/bin/structure-synth" --chdir "$out/share" 37 37 ''; 38 38 39 39 meta = with lib; {