diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index f1d4b1c3747c..b2ded4c7ac73 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -15,7 +15,7 @@ let # unfuck is linux-only right now, we will just use it there dwarf-fortress-unfuck = if stdenv.isLinux then callPackage ./unfuck.nix { } - else null; + else null; dwarf-fortress = callPackage ./wrapper { inherit themes; diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index a15acdc267f7..a6430fa3c260 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "DFHack"; repo = "dfhack"; - sha256 = "16ypcl9378xxnq7ngzh93pmx2haf2i32xgxs2p1q4bvvafdxvirz"; + sha256 = "1vzrpdw0pn18calayf9dwqpyg37cb7wkzkvskxjx9nak5ilxzywm"; rev = version; fetchSubmodules = true; }; diff --git a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix index d8270c6000a5..bd63e3eae91f 100644 --- a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix +++ b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix @@ -20,8 +20,8 @@ stdenv.mkDerivation rec { '' else null; meta = with stdenv.lib; { - description = "Tool to manage dwarves in in a running game of Dwarf Fortress"; - maintainers = with maintainers; [ the-kenny abbradar bendlas ]; + description = "Tool to manage dwarves in a running game of Dwarf Fortress"; + maintainers = with maintainers; [ the-kenny abbradar bendlas numinit ]; license = licenses.mit; platforms = platforms.unix; homepage = https://github.com/Dwarf-Therapist/Dwarf-Therapist; diff --git a/pkgs/games/dwarf-fortress/game.nix b/pkgs/games/dwarf-fortress/game.nix index 0812ffde0660..b3ef6154d9af 100644 --- a/pkgs/games/dwarf-fortress/game.nix +++ b/pkgs/games/dwarf-fortress/game.nix @@ -91,3 +91,4 @@ 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 2aa69d7623f3..e5bd7930f038 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -20,12 +20,26 @@ stdenv.mkDerivation { "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" ]; + makeFlags = [ + ''CFLAGS="-fkeep-inline-functions"'' + ''CXXFLAGS="-fkeep-inline-functions"'' + ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ libSM SDL SDL_image SDL_ttf glew openalSoft ncurses gtk2 libsndfile zlib libGL ]; + patchPhase = '' + substituteInPlace CMakeLists.txt --replace \ + 'set(CMAKE_BUILD_TYPE Release)' \ + 'set(CMAKE_BUILD_TYPE Debug)' + ''; + + # Don't strip unused symbols; dfhack hooks into some of them. + dontStrip = true; + installPhase = '' install -D -m755 ../build/libgraphics.so $out/lib/libgraphics.so ''; @@ -45,3 +59,4 @@ 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 e6e17533d213..1ed58a892745 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { src = ./dwarf-fortress-init.in; inherit env; exe = if stdenv.isLinux then "libs/Dwarf_Fortress" - else "dwarfort.exe"; + else "dwarfort.exe"; }; runDF = ./dwarf-fortress.in; @@ -83,3 +83,4 @@ stdenv.mkDerivation rec { preferLocalBuild = true; } + diff --git a/pkgs/games/dwarf-fortress/wrapper/dfhack.in b/pkgs/games/dwarf-fortress/wrapper/dfhack.in index 4cf884ebed2c..910d75ad8e15 100644 --- a/pkgs/games/dwarf-fortress/wrapper/dfhack.in +++ b/pkgs/games/dwarf-fortress/wrapper/dfhack.in @@ -7,5 +7,6 @@ for i in dfhack.init-example dfhack-config/default hack/* stonesense/*; do done cd "$DF_DIR" -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 "$@" +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" "$@"