blob: 7c80c1012462d585a143682b26db74a96c4f3e78 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
{ stdenvNoCC, lib, fetchurl, unzip
, dfVersion
}:
with lib;
let
twbt-releases = {
"0.43.05" = {
twbtRelease = "6.22";
sha256 = "0di5d38f6jj9smsz0wjcs1zav4zba6hrk8cbn59kwpb1wamsh5c7";
prerelease = false;
};
"0.44.05" = {
twbtRelease = "6.35";
sha256 = "0qjkgl7dsqzsd7pdq8a5bihhi1wplfkv1id7sj6dp3swjpsfxp8g";
prerelease = false;
};
"0.44.09" = {
twbtRelease = "6.41";
sha256 = "0nsq15z05pbhqjvw2xqs1a9b1n2ma0aalhc3vh3mi4cd4k7lxh44";
prerelease = false;
};
"0.44.10" = {
twbtRelease = "6.49";
sha256 = "1qjkc7k33qhxj2g18njzasccjqsis5y8zrw5vl90h4rs3i8ld9xz";
prerelease = false;
};
"0.44.11" = {
twbtRelease = "6.51";
sha256 = "1yclqmarjd97ch054h425a12r8a5ailmflsd7b39cg4qhdr1nii5";
prerelease = true;
};
"0.44.12" = {
twbtRelease = "6.54";
sha256 = "10gfd6vv0vk4v1r5hjbz7vf1zqys06dsad695gysc7fbcik2dakh";
prerelease = false;
};
};
release = if hasAttr dfVersion twbt-releases
then getAttr dfVersion twbt-releases
else throw "[TWBT] Unsupported Dwarf Fortress version: ${dfVersion}";
warning = if release.prerelease then builtins.trace "[TWBT] Version ${version} is a prerelease. Careful!"
else null;
in
stdenvNoCC.mkDerivation rec {
name = "twbt-${version}";
version = release.twbtRelease;
src = fetchurl {
url = "https://github.com/mifki/df-twbt/releases/download/v${version}/twbt-${version}-linux.zip";
sha256 = release.sha256;
};
sourceRoot = ".";
outputs = [ "lib" "art" "out" ];
buildInputs = [ unzip ];
installPhase = ''
mkdir -p $lib/hack/{plugins,lua} $art/data/art
cp -a */twbt.plug.so $lib/hack/plugins/
cp -a *.lua $lib/hack/lua/
cp -a *.png $art/data/art/
'';
meta = with stdenvNoCC.lib; {
description = "A plugin for Dwarf Fortress / DFHack that improves various aspects the game interface.";
maintainers = with maintainers; [ Baughn numinit ];
license = licenses.mit;
platforms = platforms.linux;
homepage = https://github.com/mifki/df-twbt;
};
}
|