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/worldofgoo | |
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/worldofgoo')
-rw-r--r-- | pkgs/games/worldofgoo/default.nix | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix index 97bfd9e730c..7d8380e9f7c 100644 --- a/pkgs/games/worldofgoo/default.nix +++ b/pkgs/games/worldofgoo/default.nix @@ -1,25 +1,26 @@ { stdenv, requireFile , libX11, libXext, libXau, libxcb, libXdmcp , SDL, SDL_mixer, libvorbis, libGLU_combined +, runtimeShell , demo ? false }: # TODO: add i686 support stdenv.mkDerivation rec { - name = if demo + name = if demo then "WorldOfGooDemo-1.41" else "WorldofGoo-1.41"; arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported" else throw "Sorry. World of Goo only is only supported on x86_64 now."; - goBuyItNow = '' + goBuyItNow = '' We cannot download the full version automatically, as you require a license. Once you bought a license, you need to add your downloaded version to the nix store. You can do this by using "nix-prefetch-url file://\$PWD/WorldOfGooSetup.1.41.tar.gz" in the directory where you saved it. - Or you can install the demo version: 'nix-env -i -A pkgs.worldofgoo_demo'. - ''; + Or you can install the demo version: 'nix-env -i -A pkgs.worldofgoo_demo'. + ''; getTheDemo = '' We cannot download the demo version automatically. Please go to @@ -28,8 +29,8 @@ stdenv.mkDerivation rec { directory where you saved it. ''; - src = if demo - then + src = if demo + then requireFile { message = getTheDemo; name = "WorldOfGooDemo.1.41.tar.gz"; @@ -45,7 +46,7 @@ stdenv.mkDerivation rec { phases = "unpackPhase installPhase"; # XXX: stdenv.lib.makeLibraryPath doesn't pick up /lib64 - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + ":" + stdenv.lib.makeLibraryPath [libX11 libXext libXau libxcb libXdmcp SDL SDL_mixer libvorbis libGLU_combined ] + ":" + stdenv.cc.cc + "/lib64"; @@ -60,7 +61,7 @@ stdenv.mkDerivation rec { #makeWrapper doesn't do cd. :( cat > $out/bin/WorldofGoo << EOF - #!${stdenv.shell} + #!${runtimeShell} cd $out/libexec/2dboy/WorldOfGoo exec ./WorldOfGoo.bin64 EOF |