blob: 85cca0998fbc89d1499b4f998cd5b405542625f8 (
about) (
plain)
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
80
81
82
83
|
{
stdenvNoCC,
lib,
fetchurl,
unzip,
dfVersion,
}:
let
inherit (lib)
getAttr
hasAttr
licenses
maintainers
platforms
;
twbt-releases = {
"0.44.12" = {
twbtRelease = "6.54";
hash = "sha256-cKomZmTLHab9K8k0pZsB2uMf3D5/SVhy2GRusLdp7oE=";
prerelease = false;
};
"0.47.05" = {
twbtRelease = "6.xx";
dfhackRelease = "0.47.05-r8";
hash = "sha256-qiNs6iMAUNGiq0kpXqEs4u4Wcrjf6/qA/dzBe947Trc=";
prerelease = false;
};
};
release =
if hasAttr dfVersion twbt-releases then
getAttr dfVersion twbt-releases
else
throw "[TWBT] Unsupported Dwarf Fortress version: ${dfVersion}";
in
stdenvNoCC.mkDerivation rec {
pname = "twbt";
version = release.twbtRelease;
src = fetchurl {
url =
if version == "6.xx" then
"https://github.com/thurin/df-twbt/releases/download/${release.dfhackRelease}/twbt-${version}-linux64-${release.dfhackRelease}.zip"
else
"https://github.com/mifki/df-twbt/releases/download/v${version}/twbt-${version}-linux.zip";
inherit (release) hash;
};
sourceRoot = ".";
outputs = [
"lib"
"art"
"out"
];
nativeBuildInputs = [ 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/
'';
passthru = {
inherit dfVersion;
};
meta = {
description = "Plugin for Dwarf Fortress / DFHack that improves various aspects of the game interface";
maintainers = with maintainers; [
Baughn
numinit
];
license = licenses.mit;
platforms = platforms.linux;
homepage = "https://github.com/mifki/df-twbt";
};
}
|