Patch dwarf-fortress-unfuck to build in debug (pending upstream fix)
This commit is contained in:
parent
9a2898c6d1
commit
8d5b5fa68e
|
@ -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;
|
||||
|
|
|
@ -40,7 +40,7 @@ in stdenv.mkDerivation rec {
|
|||
src = fetchFromGitHub {
|
||||
owner = "DFHack";
|
||||
repo = "dfhack";
|
||||
sha256 = "16ypcl9378xxnq7ngzh93pmx2haf2i32xgxs2p1q4bvvafdxvirz";
|
||||
sha256 = "1vzrpdw0pn18calayf9dwqpyg37cb7wkzkvskxjx9nak5ilxzywm";
|
||||
rev = version;
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -91,3 +91,4 @@ stdenv.mkDerivation {
|
|||
maintainers = with maintainers; [ a1russell robbinch roconnor the-kenny abbradar numinit ];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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" "$@"
|
||||
|
|
Loading…
Reference in a new issue