diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2019-02-26 11:45:54 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2019-02-26 14:10:49 +0000 |
commit | dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1 (patch) | |
tree | 9717b203342cd121abcdfde5ba8b66235c3ad67c /pkgs/games/steam | |
parent | 1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff) | |
download | nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.gz nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.bz2 nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.lz nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.xz nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.zst nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.zip |
treewide: use runtimeShell instead of stdenv.shell whenever possible
Whenever we create scripts that are installed to $out, we must use runtimeShell in order to get the shell that can be executed on the machine we create the package for. This is relevant for cross-compiling. The only use case for stdenv.shell are scripts that are executed as part of the build system. Usages in checkPhase are borderline however to decrease the likelyhood of people copying the wrong examples, I decided to use runtimeShell as well.
Diffstat (limited to 'pkgs/games/steam')
-rw-r--r-- | pkgs/games/steam/chrootenv.nix | 9 | ||||
-rw-r--r-- | pkgs/games/steam/steam.nix | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index 17f25e25e3f..4661cf7d803 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -4,6 +4,7 @@ , extraProfile ? "" # string to append to profile , nativeOnly ? false , runtimeOnly ? false +, runtimeShell # DEPRECATED , withJava ? config.steam.java or false @@ -35,7 +36,7 @@ let ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs); runSh = writeScript "run.sh" '' - #!${stdenv.shell} + #!${runtimeShell} runtime_paths="${lib.concatStringsSep ":" ldPath}" if [ "$1" == "--print-steam-runtime-library-paths" ]; then echo "$runtime_paths" @@ -195,7 +196,7 @@ in buildFHSUserEnv rec { '' + extraProfile; runScript = writeScript "steam-wrapper.sh" '' - #!${stdenv.shell} + #!${runtimeShell} if [ -f /host/etc/NIXOS ]; then # Check only useful on NixOS ${glxinfo-i686}/bin/glxinfo >/dev/null 2>&1 # If there was an error running glxinfo, we know something is wrong with the configuration @@ -204,7 +205,7 @@ in buildFHSUserEnv rec { ** WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix and then run \`sudo nixos-rebuild switch\`: - { + { hardware.opengl.driSupport32Bit = true; hardware.pulseaudio.support32Bit = true; } @@ -226,7 +227,7 @@ in buildFHSUserEnv rec { inherit multiPkgs extraBuildCommands; runScript = writeScript "steam-run" '' - #!${stdenv.shell} + #!${runtimeShell} run="$1" if [ "$run" = "" ]; then echo "Usage: steam-run command-to-run args..." >&2 diff --git a/pkgs/games/steam/steam.nix b/pkgs/games/steam/steam.nix index dd6e9a070b1..95493498f5e 100644 --- a/pkgs/games/steam/steam.nix +++ b/pkgs/games/steam/steam.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, traceDeps ? false}: +{stdenv, fetchurl, runtimeShell, traceDeps ? false}: let traceLog = "/tmp/steam-trace-dependencies.log"; @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { rm $out/bin/steamdeps ${stdenv.lib.optionalString traceDeps '' cat > $out/bin/steamdeps <<EOF - #!${stdenv.shell} + #!${runtimeShell} echo \$1 >> ${traceLog} cat \$1 >> ${traceLog} echo >> ${traceLog} |