summary refs log tree commit diff
path: root/pkgs/servers
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/servers
parent1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff)
downloadnixpkgs-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/servers')
-rw-r--r--pkgs/servers/mail/system-sendmail/default.nix4
-rw-r--r--pkgs/servers/meteor/default.nix4
-rw-r--r--pkgs/servers/monitoring/plugins/default.nix5
-rw-r--r--pkgs/servers/nosql/eventstore/default.nix4
-rw-r--r--pkgs/servers/web-apps/codimd/default.nix4
-rw-r--r--pkgs/servers/xmpp/pyIRCt/default.nix4
-rw-r--r--pkgs/servers/xmpp/pyMAILt/default.nix4
-rw-r--r--pkgs/servers/zookeeper/default.nix4
8 files changed, 17 insertions, 16 deletions
diff --git a/pkgs/servers/mail/system-sendmail/default.nix b/pkgs/servers/mail/system-sendmail/default.nix
index fe0aeb5b3af..7bd7df84924 100644
--- a/pkgs/servers/mail/system-sendmail/default.nix
+++ b/pkgs/servers/mail/system-sendmail/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, writeText }:
+{ stdenv, writeText, runtimeShell }:
 
 let script = writeText "script" ''
-  #!${stdenv.shell}
+  #!${runtimeShell}
 
   if command -v sendmail > /dev/null 2>&1 && [ "$(command -v sendmail)" != "{{MYPATH}}" ]; then
     exec sendmail "$@"
diff --git a/pkgs/servers/meteor/default.nix b/pkgs/servers/meteor/default.nix
index 132f812bf46..b677b6080d1 100644
--- a/pkgs/servers/meteor/default.nix
+++ b/pkgs/servers/meteor/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, zlib, patchelf }:
+{ stdenv, lib, fetchurl, zlib, patchelf, runtimeShell }:
 
 let
   bootstrap = fetchurl {
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
     # otherwise it fails spectacularly.
     mkdir -p $out/bin
     cat << EOF > $out/bin/meteor
-    #!${stdenv.shell}
+    #!${runtimeShell}
 
     if [[ ! -f \$HOME/.meteor/package-metadata/v2.0.1/packages.data.db ]]; then
       mkdir -p \$HOME/.meteor/package-metadata/v2.0.1
diff --git a/pkgs/servers/monitoring/plugins/default.nix b/pkgs/servers/monitoring/plugins/default.nix
index a0f7341571c..3e6eaa4766e 100644
--- a/pkgs/servers/monitoring/plugins/default.nix
+++ b/pkgs/servers/monitoring/plugins/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchFromGitHub, autoreconfHook
-, coreutils, gnugrep, gnused, lm_sensors, net_snmp, openssh, openssl, perl }:
+, coreutils, gnugrep, gnused, lm_sensors, net_snmp, openssh, openssl, perl
+, runtimeShell }:
 
 with stdenv.lib;
 
@@ -50,7 +51,7 @@ in stdenv.mkDerivation rec {
   preBuild = ''
     mkdir -p $out
     cat <<_EOF > $out/share
-#!${stdenv.shell}
+#!${runtimeShell}
 exit 0
 _EOF
     chmod 755 $out/share
diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix
index 1d3240fae71..7880c6db7fd 100644
--- a/pkgs/servers/nosql/eventstore/default.nix
+++ b/pkgs/servers/nosql/eventstore/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, git, mono, v8 }:
+{ stdenv, fetchFromGitHub, git, mono, v8, runtimeShell }:
 
 # There are some similarities with the pinta derivation. We should
 # have a helper to make it easy to package these Mono apps.
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     mkdir -p $out/{bin,lib/eventstore/clusternode}
     cp -r bin/clusternode/* $out/lib/eventstore/clusternode/
     cat > $out/bin/clusternode << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     exec ${mono}/bin/mono $out/lib/eventstore/clusternode/EventStore.ClusterNode.exe "\$@"
     EOF
     chmod +x $out/bin/clusternode
diff --git a/pkgs/servers/web-apps/codimd/default.nix b/pkgs/servers/web-apps/codimd/default.nix
index c48a9f938bd..d5e84cce984 100644
--- a/pkgs/servers/web-apps/codimd/default.nix
+++ b/pkgs/servers/web-apps/codimd/default.nix
@@ -1,5 +1,5 @@
 { stdenv, pkgs, buildEnv, fetchFromGitHub, makeWrapper
-, fetchpatch, nodejs-6_x, phantomjs2 }:
+, fetchpatch, nodejs-6_x, phantomjs2, runtimeShell }:
 let
   nodePackages = import ./node.nix {
     inherit pkgs;
@@ -126,7 +126,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     mkdir -p $out/bin
     cat > $out/bin/codimd <<EOF
-      #!${stdenv.shell}
+      #!${runtimeShell}
       ${nodejs-6_x}/bin/node $out/app.js
     EOF
     cp -R {app.js,bin,lib,locales,package.json,public} $out/
diff --git a/pkgs/servers/xmpp/pyIRCt/default.nix b/pkgs/servers/xmpp/pyIRCt/default.nix
index 535fb061de9..8df8499d11e 100644
--- a/pkgs/servers/xmpp/pyIRCt/default.nix
+++ b/pkgs/servers/xmpp/pyIRCt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, xmpppy, pythonIRClib, python, pythonPackages } :
+{ stdenv, fetchurl, xmpppy, pythonIRClib, python, pythonPackages, runtimeShell } :
 
 stdenv.mkDerivation rec {
   name = "pyIRCt-${version}";
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     sed -e '/configFiles/iimport os' -i config.py
     cp * $out/share/${name}
     cat > $out/bin/pyIRCt <<EOF
-      #!${stdenv.shell}
+      #!${runtimeShell}
       cd $out/share/${name}
       ./irc.py \"$@\"
     EOF
diff --git a/pkgs/servers/xmpp/pyMAILt/default.nix b/pkgs/servers/xmpp/pyMAILt/default.nix
index b1c4d93f687..76861ab842b 100644
--- a/pkgs/servers/xmpp/pyMAILt/default.nix
+++ b/pkgs/servers/xmpp/pyMAILt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, python, xmpppy, pythonPackages, fetchcvs } :
+{ stdenv, python, xmpppy, pythonPackages, fetchcvs, runtimeShell } :
 
 stdenv.mkDerivation rec {
   name = "pyMAILt-${version}";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     sed -e '/configFiles/iimport os' -i config.py
     cp * $out/share/$name
     cat > $out/bin/pyMAILt <<EOF
-      #!${stdenv.shell}
+      #!${runtimeShell}
       cd $out/share/${name}
       ./mail.py \"$@\"
     EOF
diff --git a/pkgs/servers/zookeeper/default.nix b/pkgs/servers/zookeeper/default.nix
index 780a77c5caa..5bacaf2982e 100644
--- a/pkgs/servers/zookeeper/default.nix
+++ b/pkgs/servers/zookeeper/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jre, makeWrapper, bash, coreutils }:
+{ stdenv, fetchurl, jre, makeWrapper, bash, coreutils, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "zookeeper-${version}";
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
     done
 
     cat << EOF > $out/bin/zooInspector.sh
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/share/zooinspector
     exec ${jre}/bin/java -cp $classpath org.apache.zookeeper.inspector.ZooInspector
     EOF