2015-01-26 00:00:57 +01:00
|
|
|
{ stdenv, coreutils, fetchgit, qt4, dwarf_fortress, bash, makeWrapper }:
|
2013-10-10 01:15:16 +02:00
|
|
|
|
2014-12-15 22:13:51 +01:00
|
|
|
let
|
2015-07-20 11:23:34 +02:00
|
|
|
version = "31.0.0";
|
2014-12-15 22:13:51 +01:00
|
|
|
df = dwarf_fortress;
|
|
|
|
in
|
2013-10-10 01:15:16 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2014-12-15 22:13:51 +01:00
|
|
|
name = "dwarf-therapist-${version}";
|
2013-10-10 01:15:16 +02:00
|
|
|
|
2015-01-26 00:00:57 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/splintermind/Dwarf-Therapist.git";
|
2015-07-20 11:23:34 +02:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "02d6k8c3vm401v04ln9q405njarx869jpfyf42lwskijrzjygk9x";
|
2013-10-10 01:15:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Needed for hashing
|
2014-12-15 22:13:51 +01:00
|
|
|
dfHashFile = "${df}/share/df_linux/hash.md5";
|
2013-10-10 01:15:16 +02:00
|
|
|
|
2014-12-15 22:13:51 +01:00
|
|
|
buildInputs = [ coreutils qt4 df makeWrapper ];
|
2013-10-10 01:15:16 +02:00
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2014-12-15 22:13:51 +01:00
|
|
|
configurePhase = ''
|
2015-01-26 00:00:57 +01:00
|
|
|
qmake PREFIX=$out
|
2013-10-10 01:15:16 +02: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 22:13:51 +01:00
|
|
|
substituteInPlace $out/share/dwarftherapist/memory_layouts/linux/v0${df.baseVersion}.${df.patchVersion}.ini \
|
|
|
|
--replace $(cat "${dfHashFile}.orig") $(cat "${dfHashFile}.patched")
|
2013-10-10 01:15:16 +02: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 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2013-11-05 00:04:36 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2013-10-10 01:15:16 +02:00
|
|
|
homepage = https://code.google.com/r/splintermind-attributes/;
|
|
|
|
};
|
2014-12-15 22:13:51 +01:00
|
|
|
}
|