summary refs log tree commit diff
path: root/pkgs/games/gargoyle
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2019-01-15 23:41:31 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2019-01-16 20:37:15 +0100
commitbcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183 (patch)
tree26aef5b71509a26f7986e6cf9928b7687c21787d /pkgs/games/gargoyle
parent3956a8421f2d78bc66ad9d3c23a3b5510bc695be (diff)
downloadnixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar
nixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.gz
nixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.bz2
nixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.lz
nixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.xz
nixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.zst
nixpkgs-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.zip
treewide: use ${stdenv.shell} instead of /bin/sh where possible
Diffstat (limited to 'pkgs/games/gargoyle')
-rw-r--r--pkgs/games/gargoyle/darwin.sh2
-rw-r--r--pkgs/games/gargoyle/default.nix13
2 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/games/gargoyle/darwin.sh b/pkgs/games/gargoyle/darwin.sh
index 9bd45d0b1d5..ed0daec4ef1 100644
--- a/pkgs/games/gargoyle/darwin.sh
+++ b/pkgs/games/gargoyle/darwin.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@shell@
 
 set -e
 
diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix
index 5bf0ae1c814..c908a9b75a9 100644
--- a/pkgs/games/gargoyle/default.nix
+++ b/pkgs/games/gargoyle/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, jam, cctools, pkgconfig
+{ stdenv, fetchFromGitHub, substituteAll, jam, cctools, pkgconfig
 , SDL, SDL_mixer, SDL_sound, cf-private, gtk2, libvorbis, smpeg }:
 
 let
@@ -29,16 +29,19 @@ stdenv.mkDerivation {
     sha256 = "0icwgc25gp7krq6zf66hljydc6vps6bb4knywnrfgnfcmcalqqx9";
   };
 
-  nativeBuildInputs = [ jam pkgconfig ] ++ lib.optional stdenv.isDarwin cctools;
+  nativeBuildInputs = [ jam pkgconfig ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
 
   buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ]
-    ++ lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
+    ++ stdenv.lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
 
   patches = [ ./darwin.patch ];
 
   buildPhase = jamenv + "jam -j$NIX_BUILD_CORES";
 
-  installPhase = if stdenv.isDarwin then (builtins.readFile ./darwin.sh) else jamenv + ''
+  installPhase =
+  if stdenv.isDarwin then
+    (substituteAll { inherit (stdenv) shell; src = ./darwin.sh; })
+  else jamenv + ''
     jam -j$NIX_BUILD_CORES install
     mkdir -p "$out/bin"
     ln -s ../libexec/gargoyle/gargoyle "$out/bin"
@@ -52,7 +55,7 @@ stdenv.mkDerivation {
 
   enableParallelBuilding = true;
 
-  meta = with lib; {
+  meta = with stdenv.lib; {
     homepage = http://ccxvii.net/gargoyle/;
     license = licenses.gpl2Plus;
     description = "Interactive fiction interpreter GUI";