diff options
author | Morgan Jones <me@numin.it> | 2018-07-01 20:28:59 +0000 |
---|---|---|
committer | Morgan Jones <me@numin.it> | 2018-07-01 20:28:59 +0000 |
commit | 8d5b5fa68e7d4679cf7fd0f122507a4ef1880908 (patch) | |
tree | a41773b04f1ef513e2e8f223495b8e4f178755a1 /pkgs/games/dwarf-fortress | |
parent | 9a2898c6d1406489c1d691ecbbb3585888c1c613 (diff) |
Patch dwarf-fortress-unfuck to build in debug (pending upstream fix)
Diffstat (limited to 'pkgs/games/dwarf-fortress')
-rw-r--r-- | pkgs/games/dwarf-fortress/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/dfhack/default.nix | 2 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/dwarf-therapist/default.nix | 4 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/game.nix | 1 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/unfuck.nix | 15 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/wrapper/default.nix | 3 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/wrapper/dfhack.in | 5 |
7 files changed, 25 insertions, 7 deletions
diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index f1d4b1c3747cc..b2ded4c7ac73f 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 a15acdc267f7b..a6430fa3c2607 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 d8270c6000a5c..bd63e3eae91fd 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 0812ffde06605..b3ef6154d9afd 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 2aa69d7623f3b..e5bd7930f0386 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 e6e17533d213f..1ed58a8927456 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 4cf884ebed2cd..910d75ad8e15d 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" "$@" |