2015-01-25 23:00:57 +00:00
|
|
|
{ stdenv, coreutils, fetchgit, qt4, dwarf_fortress, bash, makeWrapper }:
|
2013-10-10 00:15:16 +01:00
|
|
|
|
2014-12-15 21:13:51 +00:00
|
|
|
let
|
2015-01-25 23:00:57 +00:00
|
|
|
version = "30.2.0pre";
|
2014-12-15 21:13:51 +00:00
|
|
|
df = dwarf_fortress;
|
|
|
|
in
|
2013-10-10 00:15:16 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-12-15 21:13:51 +00:00
|
|
|
name = "dwarf-therapist-${version}";
|
2013-10-10 00:15:16 +01:00
|
|
|
|
2015-01-25 23:00:57 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/splintermind/Dwarf-Therapist.git";
|
|
|
|
rev = "65bb15a29d616d788c20a3344058b7277e4fadba";
|
|
|
|
sha256 = "1q1n9sm0lgmn52m4aigb22cdfbh2s569y1mn5cmimgj600i6c2f2";
|
2013-10-10 00:15:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Needed for hashing
|
2014-12-15 21:13:51 +00:00
|
|
|
dfHashFile = "${df}/share/df_linux/hash.md5";
|
2013-10-10 00:15:16 +01:00
|
|
|
|
2014-12-15 21:13:51 +00:00
|
|
|
buildInputs = [ coreutils qt4 df makeWrapper ];
|
2013-10-10 00:15:16 +01:00
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2014-12-15 21:13:51 +00:00
|
|
|
configurePhase = ''
|
2015-01-25 23:00:57 +00:00
|
|
|
qmake PREFIX=$out
|
2013-10-10 00:15:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# DwarfTherapist assumes it's run in $out/share/dwarftherapist and
|
|
|
|
# therefore uses many relative paths.
|
|
|
|
rm $out/bin/dwarftherapist
|
|
|
|
wrapProgram $out/bin/DwarfTherapist \
|
|
|
|
--run "cd $out/share/dwarftherapist"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Fix checksum of memory access directives
|
2014-12-15 21:13:51 +00:00
|
|
|
substituteInPlace $out/share/dwarftherapist/memory_layouts/linux/v0${df.baseVersion}.${df.patchVersion}.ini \
|
|
|
|
--replace $(cat "${dfHashFile}.orig") $(cat "${dfHashFile}.patched")
|
2013-10-10 00:15:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Tool to manage dwarves in in a running game of Dwarf Fortress";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2013-11-04 23:04:36 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2013-10-10 00:15:16 +01:00
|
|
|
homepage = https://code.google.com/r/splintermind-attributes/;
|
|
|
|
};
|
2014-12-15 21:13:51 +00:00
|
|
|
}
|