dwarf-therapist: fix build

Update for dfc4744afd.
This commit is contained in:
Orivej Desh 2018-06-07 09:04:45 +00:00
parent df92030a32
commit 24786e1249
2 changed files with 2 additions and 17 deletions

View File

@ -11,24 +11,9 @@ stdenv.mkDerivation rec {
sha256 = "0b5y7800nzydn0jcc0vglgi9mzkj8f3qhw16wd872cf5396xnag9";
};
outputs = [ "out" "layouts" ];
buildInputs = [ qtbase qtdeclarative ];
nativeBuildInputs = [ texlive cmake ninja ];
configurePhase = ''
cmake -GNinja
'';
buildPhase = ''
ninja -j$NIX_BUILD_CORES
'';
installPhase = ''
mkdir -p $out/bin
cp ./DwarfTherapist $out/bin/DwarfTherapist
cp -r ./share/memory_layouts $layouts
'';
meta = with stdenv.lib; {
description = "Tool to manage dwarves in in a running game of Dwarf Fortress";
maintainers = with maintainers; [ the-kenny abbradar bendlas ];

View File

@ -18,7 +18,7 @@ in symlinkJoin {
postBuild = ''
# DwarfTherapist assumes it's run in $out/share/dwarftherapist and
# therefore uses many relative paths.
wrapProgram $out/bin/DwarfTherapist \
wrapProgram $out/bin/dwarftherapist \
--run "cd $out/share/dwarftherapist"
rm -rf $out/share/dwarftherapist/memory_layouts/linux
@ -26,7 +26,7 @@ in symlinkJoin {
origmd5=$(cat "${dfHashFile}.orig" | cut -c1-8)
patchedmd5=$(cat "${dfHashFile}" | cut -c1-8)
substitute \
${dt.layouts}/${inifile} \
${dt}/share/dwarftherapist/memory_layouts/${inifile} \
$out/share/dwarftherapist/memory_layouts/${inifile} \
--replace "$origmd5" "$patchedmd5"
'';