2021-06-29 02:42:37 +00:00
|
|
|
{ stdenvNoCC
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
2018-07-12 08:42:52 +00:00
|
|
|
, dfVersion
|
|
|
|
}:
|
2018-07-05 15:36:27 +00:00
|
|
|
|
2018-07-12 08:42:52 +00:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2018-09-09 07:12:36 +00:00
|
|
|
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;
|
2020-02-13 23:28:49 +00:00
|
|
|
};
|
|
|
|
"0.47.02" = {
|
|
|
|
twbtRelease = "6.61";
|
|
|
|
sha256 = "07bqy9rkd64h033sxdpigp5zq4xrr0xd36wdr1b21g649mv8j6yw";
|
|
|
|
prerelease = false;
|
2020-03-12 18:40:32 +00:00
|
|
|
};
|
|
|
|
"0.47.04" = {
|
2020-08-21 21:00:48 +00:00
|
|
|
twbtRelease = "6.xx";
|
|
|
|
dfhackRelease = "0.47.04-r2";
|
|
|
|
sha256 = "092dgp8fh1j4nqr9wbzn89ib1nhscclr8m91lfxsvg0mgn7j8xlv";
|
|
|
|
prerelease = true;
|
2018-09-09 07:12:36 +00:00
|
|
|
};
|
2021-03-01 00:17:24 +00:00
|
|
|
"0.47.05" = {
|
|
|
|
twbtRelease = "6.xx";
|
2021-08-01 00:20:28 +00:00
|
|
|
dfhackRelease = "0.47.05-r1";
|
|
|
|
sha256 = "1nqhaf7271bm9rq9dmilhhk9q7v3841d0rv4y3fid40vfi4gpi3p";
|
2021-03-01 00:17:24 +00:00
|
|
|
prerelease = true;
|
|
|
|
};
|
2018-09-09 07:12:36 +00:00
|
|
|
};
|
2018-07-12 08:42:52 +00:00
|
|
|
|
2021-06-29 02:42:37 +00:00
|
|
|
release =
|
|
|
|
if hasAttr dfVersion twbt-releases
|
|
|
|
then getAttr dfVersion twbt-releases
|
|
|
|
else throw "[TWBT] Unsupported Dwarf Fortress version: ${dfVersion}";
|
2018-07-12 08:42:52 +00:00
|
|
|
in
|
2018-07-05 15:36:27 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
2019-08-31 11:41:23 +00:00
|
|
|
pname = "twbt";
|
2018-07-12 08:42:52 +00:00
|
|
|
version = release.twbtRelease;
|
2018-07-05 15:36:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-08-21 21:00:48 +00:00
|
|
|
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";
|
2018-07-12 08:42:52 +00:00
|
|
|
sha256 = release.sha256;
|
2018-07-05 15:36:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
outputs = [ "lib" "art" "out" ];
|
|
|
|
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2018-07-05 15:36:27 +00:00
|
|
|
|
|
|
|
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/
|
|
|
|
'';
|
|
|
|
|
2021-01-17 13:51:41 +00:00
|
|
|
meta = with lib; {
|
2018-07-05 15:36:27 +00:00
|
|
|
description = "A plugin for Dwarf Fortress / DFHack that improves various aspects the game interface.";
|
2018-07-12 08:42:52 +00:00
|
|
|
maintainers = with maintainers; [ Baughn numinit ];
|
2018-07-05 15:36:27 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/mifki/df-twbt";
|
2018-07-05 15:36:27 +00:00
|
|
|
};
|
|
|
|
}
|