about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix')
-rw-r--r--nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix42
1 files changed, 29 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix b/nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix
index 73288ab659f3..ce989b98ffbd 100644
--- a/nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix
+++ b/nixpkgs/pkgs/games/dwarf-fortress/wrapper/default.nix
@@ -1,13 +1,22 @@
-{ stdenv, lib, buildEnv, substituteAll, runCommand
+{ stdenv
+, lib
+, buildEnv
+, substituteAll
+, runCommand
+, coreutils
 , dwarf-fortress
 , dwarf-therapist
-, enableDFHack ? false, dfhack
-, enableSoundSense ? false, soundSense, jdk
+, enableDFHack ? false
+, dfhack
+, enableSoundSense ? false
+, soundSense
+, jdk
 , enableStoneSense ? false
-, enableTWBT ? false, twbt
-, themes ? {}
+, enableTWBT ? false
+, twbt
+, themes ? { }
 , theme ? null
-# General config options:
+  # General config options:
 , enableIntro ? true
 , enableTruetype ? true
 , enableFPS ? false
@@ -31,11 +40,11 @@ let
   # These are in inverse order for first packages to override the next ones.
   themePkg = lib.optional (theme != null) ptheme;
   pkgs = lib.optional enableDFHack dfhack_
-         ++ lib.optional enableSoundSense soundSense
-         ++ lib.optional enableTWBT twbt.art
-         ++ [ dwarf-fortress ];
+    ++ lib.optional enableSoundSense soundSense
+    ++ lib.optional enableTWBT twbt.art
+    ++ [ dwarf-fortress ];
 
-  fixup = lib.singleton (runCommand "fixup" {} (''
+  fixup = lib.singleton (runCommand "fixup" { } (''
     mkdir -p $out/data/init
   '' + (if (theme != null) then ''
     cp ${lib.head themePkg}/data/init/init.txt $out/data/init/init.txt
@@ -61,7 +70,7 @@ let
     substituteInPlace $out/data/init/init.txt \
       --replace '[PRINT_MODE:2D]' '[PRINT_MODE:TWBT]'
   '' +
- lib.optionalString enableTextMode ''
+  lib.optionalString enableTextMode ''
     substituteInPlace $out/data/init/init.txt \
       --replace '[PRINT_MODE:2D]' '[PRINT_MODE:TEXT]'
   '' + ''
@@ -89,8 +98,15 @@ stdenv.mkDerivation {
     name = "dwarf-fortress-init";
     src = ./dwarf-fortress-init.in;
     inherit env;
-    exe = if stdenv.isLinux then "libs/Dwarf_Fortress"
-                            else "dwarfort.exe";
+    exe =
+      if stdenv.isLinux then "libs/Dwarf_Fortress"
+      else "dwarfort.exe";
+    stdenv_shell = "${stdenv.shell}";
+    cp = "${coreutils}/bin/cp";
+    rm = "${coreutils}/bin/rm";
+    ln = "${coreutils}/bin/ln";
+    cat = "${coreutils}/bin/cat";
+    mkdir = "${coreutils}/bin/mkdir";
   };
 
   runDF = ./dwarf-fortress.in;