From dcea2110848c742e59b5bb6964637b65f945d2a0 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 2 Jul 2018 11:57:07 -0400 Subject: [PATCH] dwarf-fortress: cleanup --- pkgs/games/dwarf-fortress/game.nix | 3 +-- pkgs/games/dwarf-fortress/unfuck.nix | 3 +-- pkgs/games/dwarf-fortress/wrapper/default.nix | 11 ++--------- pkgs/games/dwarf-fortress/wrapper/dfhack.in | 5 ++--- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/pkgs/games/dwarf-fortress/game.nix b/pkgs/games/dwarf-fortress/game.nix index b3ef6154d9af..97a94c940cd4 100644 --- a/pkgs/games/dwarf-fortress/game.nix +++ b/pkgs/games/dwarf-fortress/game.nix @@ -29,7 +29,7 @@ let }; "x86_64-darwin" = fetchurl { url = "${homepage}df_${baseVersion}_${patchVersion}_osx.tar.bz2"; - sha256 = "1cxckszjh5fi9czywr1kl5kj9zxzaszhqdal5gd8ww0ihcbl7fcd"; + sha256 = "073hmcj7bm323m3xqi42605rkvmgmv83bnxz1byymgs8aqyfykkx"; }; }; @@ -91,4 +91,3 @@ stdenv.mkDerivation { maintainers = with maintainers; [ a1russell robbinch roconnor the-kenny abbradar numinit ]; }; } - diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix index e5bd7930f038..b9887fe4cfc0 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { ncurses gtk2 libsndfile zlib libGL ]; - patchPhase = '' + postPatch = '' substituteInPlace CMakeLists.txt --replace \ 'set(CMAKE_BUILD_TYPE Release)' \ 'set(CMAKE_BUILD_TYPE Debug)' @@ -59,4 +59,3 @@ stdenv.mkDerivation { maintainers = with maintainers; [ abbradar ]; }; } - diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix index 1ed58a892745..99625abd99d2 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildEnv, dwarf-fortress-original, dwarf-fortress-unfuck, substituteAll +{ stdenv, lib, buildEnv, dwarf-fortress-original, substituteAll , enableDFHack ? false, dfhack , enableSoundSense ? false, soundSense, jdk , enableStoneSense ? false @@ -11,8 +11,6 @@ let inherit enableStoneSense; }; - dfVersion = dwarf-fortress-original.dfVersion; - ptheme = if builtins.isString theme then builtins.getAttr theme themes @@ -43,11 +41,7 @@ in stdenv.mkDerivation rec { name = "dwarf-fortress-${dwarf-fortress-original.dfVersion}"; - compatible = lib.all (x: x.dfVersion == dwarf-fortress-original.dfVersion) [ - dwarf-fortress-original - dwarf-fortress-unfuck - dfhack - ]; + compatible = lib.all (x: assert (x.dfVersion == dwarf-fortress-original.dfVersion); true) pkgs; dfInit = substituteAll { name = "dwarf-fortress-init"; @@ -83,4 +77,3 @@ stdenv.mkDerivation rec { preferLocalBuild = true; } - diff --git a/pkgs/games/dwarf-fortress/wrapper/dfhack.in b/pkgs/games/dwarf-fortress/wrapper/dfhack.in index 910d75ad8e15..4cf884ebed2c 100644 --- a/pkgs/games/dwarf-fortress/wrapper/dfhack.in +++ b/pkgs/games/dwarf-fortress/wrapper/dfhack.in @@ -7,6 +7,5 @@ for i in dfhack.init-example dfhack-config/default hack/* stonesense/*; do done cd "$DF_DIR" -export LD_LIBRARY_PATH="$env_dir/hack/libs:$env_dir/hack:$LD_LIBRARY_PATH" -export LD_PRELOAD="$env_dir/hack/libdfhack.so:$LD_PRELOAD" -exec "$env_dir/libs/Dwarf_Fortress" "$@" +LD_LIBRARY_PATH="$env_dir/hack/libs:$env_dir/hack:$LD_LIBRARY_PATH" \ + LD_PRELOAD="$env_dir/hack/libdfhack.so:$LD_PRELOAD" exec $env_dir/libs/Dwarf_Fortress "$@"