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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, unzip }:
|
||||
{ stdenv, fetchurl, unzip, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "avr8-burn-omat-2.1.2";
|
||||
@@ -18,8 +18,8 @@ stdenv.mkDerivation {
|
||||
mkdir -p $out/{nix-support,bin}
|
||||
mv *.jar license_gpl-3.0.txt lib *.xml *.png $out/nix-support
|
||||
cat >> $out/bin/avr8-burn-omat << EOF
|
||||
#!${stdenv.shell}
|
||||
cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar
|
||||
#!${runtimeShell}
|
||||
cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar
|
||||
EOF
|
||||
chmod +x $out/bin/avr8-burn-omat
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user