about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-02-26 11:45:54 +0000
committerJörg Thalheim <joerg@thalheim.io>2019-02-26 14:10:49 +0000
commitdadc7eb3297e6c2fb0c0e01149c8fcebd80770c1 (patch)
tree9717b203342cd121abcdfde5ba8b66235c3ad67c /pkgs/applications/graphics
parent1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff)
downloadnixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.gz
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.bz2
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.lz
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.xz
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.zst
nixlib-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/applications/graphics')
-rw-r--r--pkgs/applications/graphics/alchemy/default.nix4
-rw-r--r--pkgs/applications/graphics/autotrace/default.nix7
-rw-r--r--pkgs/applications/graphics/swingsane/default.nix4
-rw-r--r--pkgs/applications/graphics/wings/default.nix5
-rw-r--r--pkgs/applications/graphics/zgrviewer/default.nix4
5 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/applications/graphics/alchemy/default.nix b/pkgs/applications/graphics/alchemy/default.nix
index 30223658f535..09664889f35b 100644
--- a/pkgs/applications/graphics/alchemy/default.nix
+++ b/pkgs/applications/graphics/alchemy/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, jre}:
+{ stdenv, fetchurl, jre, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "alchemy-${version}";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin $out/share
     cp -a . $out/share/alchemy
     cat >> $out/bin/alchemy << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/share/alchemy
     ${jre}/bin/java -jar Alchemy.jar "$@"
     EOF
diff --git a/pkgs/applications/graphics/autotrace/default.nix b/pkgs/applications/graphics/autotrace/default.nix
index 7af7c8986f2f..cc08dce906c3 100644
--- a/pkgs/applications/graphics/autotrace/default.nix
+++ b/pkgs/applications/graphics/autotrace/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, callPackage, libpng12, imagemagick,
-  autoreconfHook, glib, pstoedit, pkgconfig, gettext, gd, darwin }:
+{ stdenv, fetchurl, callPackage, libpng12, imagemagick
+, autoreconfHook, glib, pstoedit, pkgconfig, gettext, gd, darwin
+, runtimeShell }:
 
 # TODO: Figure out why the resultant binary is somehow linked against
 # libpng16.so.16 rather than libpng12.
@@ -51,7 +52,7 @@ stdenv.mkDerivation rec {
     # pstoedit-config no longer exists, it was replaced with pkg-config
     mkdir wrappers
     cat >wrappers/pstoedit-config <<'EOF'
-    #!${stdenv.shell}
+    #!${runtimeShell}
     # replace --version with --modversion for pkg-config
     args=''${@/--version/--modversion}
     exec pkg-config pstoedit "''${args[@]}"
diff --git a/pkgs/applications/graphics/swingsane/default.nix b/pkgs/applications/graphics/swingsane/default.nix
index ac3de4a4e141..d0f2a48c589d 100644
--- a/pkgs/applications/graphics/swingsane/default.nix
+++ b/pkgs/applications/graphics/swingsane/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeDesktopItem, unzip, jre }:
+{ stdenv, fetchurl, makeDesktopItem, unzip, jre, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "swingsane-${version}";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   installPhase = let
 
     execWrapper = ''
-      #!${stdenv.shell}
+      #!${runtimeShell}
       exec ${jre}/bin/java -jar $out/share/java/swingsane/swingsane-${version}.jar "$@"
     '';
 
diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix
index e27f074b21ba..891f3586fa59 100644
--- a/pkgs/applications/graphics/wings/default.nix
+++ b/pkgs/applications/graphics/wings/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, erlang, cl, libGL, libGLU }:
+{ fetchurl, stdenv, erlang, cl, libGL, libGLU, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "wings-2.2.1";
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     cp ebin/* $out/lib/${name}/ebin
     cp -R textures shaders plugins $out/lib/$name
     cat << EOF > $out/bin/wings
-    #!${stdenv.shell}
+    #!${runtimeShell}
     ${erlang}/bin/erl \
       -pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
     EOF
@@ -43,4 +43,3 @@ stdenv.mkDerivation rec {
     platforms = with stdenv.lib.platforms; linux;
   };
 }
-
diff --git a/pkgs/applications/graphics/zgrviewer/default.nix b/pkgs/applications/graphics/zgrviewer/default.nix
index c60d4b7b904d..ac3d303a7a60 100644
--- a/pkgs/applications/graphics/zgrviewer/default.nix
+++ b/pkgs/applications/graphics/zgrviewer/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, jre, unzip}:
+{ stdenv, fetchurl, jre, unzip, runtimeShell }:
 stdenv.mkDerivation rec {
   version = "0.9.0";
   pname = "zgrviewer";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
     cp -r target/* "$out/share/java/zvtm/"
 
-    echo '#!${stdenv.shell}' > "$out/bin/zgrviewer"
+    echo '#!${runtimeShell}' > "$out/bin/zgrviewer"
     echo "${jre}/lib/openjdk/jre/bin/java -jar '$out/share/java/zvtm/zgrviewer-${version}.jar' \"\$@\"" >> "$out/bin/zgrviewer"
     chmod a+x "$out/bin/zgrviewer"
   '';