Merge pull request #41621 from orivej/dwarf-therapist

dwarf-therapist: fix build
This commit is contained in:
Sarah Brofeldt 2018-06-07 11:42:33 +02:00 committed by GitHub
commit 41cdec2e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"
'';