dwarf-fortress: Init TWBT at 6.46
This commit is contained in:
parent
1bb95d8409
commit
5012ce727a
@ -31,6 +31,8 @@ let
|
|||||||
|
|
||||||
legends-browser = callPackage ./legends-browser {};
|
legends-browser = callPackage ./legends-browser {};
|
||||||
|
|
||||||
|
twbt = callPackage ./twbt {};
|
||||||
|
|
||||||
themes = callPackage ./themes {
|
themes = callPackage ./themes {
|
||||||
stdenv = stdenvNoCC;
|
stdenv = stdenvNoCC;
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ stdenv, hostPlatform, lib, fetchFromGitHub, cmake, writeScriptBin, callPackage
|
{ stdenv, buildEnv, hostPlatform, lib, fetchurl, fetchFromGitHub, cmake, writeScriptBin, callPackage
|
||||||
, perl, XMLLibXML, XMLLibXSLT, zlib
|
, perl, XMLLibXML, XMLLibXSLT, zlib
|
||||||
, enableStoneSense ? false, allegro5, libGLU_combined
|
, enableStoneSense ? false, allegro5, libGLU_combined
|
||||||
|
, enableTWBT ? true, twbt
|
||||||
, SDL
|
, SDL
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -33,8 +34,8 @@ let
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
dfhack = stdenv.mkDerivation rec {
|
||||||
name = "dfhack-${version}";
|
name = "dfhack-base-${version}";
|
||||||
|
|
||||||
# Beware of submodules
|
# Beware of submodules
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -64,9 +65,16 @@ in stdenv.mkDerivation rec {
|
|||||||
++ lib.optionals enableStoneSense [ "-DBUILD_STONESENSE=ON" "-DSTONESENSE_INTERNAL_SO=OFF" ];
|
++ lib.optionals enableStoneSense [ "-DBUILD_STONESENSE=ON" "-DSTONESENSE_INTERNAL_SO=OFF" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
buildEnv {
|
||||||
|
name = "dfhack-${version}";
|
||||||
|
|
||||||
passthru = { inherit version dfVersion; };
|
passthru = { inherit version dfVersion; };
|
||||||
|
|
||||||
|
paths = [ dfhack ] ++ lib.optionals enableTWBT [ twbt.lib ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Memory hacking library for Dwarf Fortress and a set of tools that use it";
|
description = "Memory hacking library for Dwarf Fortress and a set of tools that use it";
|
||||||
homepage = https://github.com/DFHack/dfhack/;
|
homepage = https://github.com/DFHack/dfhack/;
|
||||||
|
35
pkgs/games/dwarf-fortress/twbt/default.nix
Normal file
35
pkgs/games/dwarf-fortress/twbt/default.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ stdenvNoCC, fetchurl, unzip }:
|
||||||
|
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation rec {
|
||||||
|
name = "twbt-${version}";
|
||||||
|
version = "6.46";
|
||||||
|
dfVersion = "0.44.10";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/mifki/df-twbt/releases/download/v${version}/twbt-${version}-linux.zip";
|
||||||
|
sha256 = "1a4k26z5n547k5j3ij2kx834963rc8vwgwcmbmzmhi893bryb1k6";
|
||||||
|
};
|
||||||
|
|
||||||
|
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 ];
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
homepage = https://github.com/mifki/df-twbt;
|
||||||
|
};
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
, enableDFHack ? false, dfhack
|
, enableDFHack ? false, dfhack
|
||||||
, enableSoundSense ? false, soundSense, jdk
|
, enableSoundSense ? false, soundSense, jdk
|
||||||
, enableStoneSense ? false
|
, enableStoneSense ? false
|
||||||
|
, enableTWBT ? false, twbt
|
||||||
, themes ? {}
|
, themes ? {}
|
||||||
, theme ? null
|
, theme ? null
|
||||||
}:
|
}:
|
||||||
@ -9,6 +10,7 @@
|
|||||||
let
|
let
|
||||||
dfhack_ = dfhack.override {
|
dfhack_ = dfhack.override {
|
||||||
inherit enableStoneSense;
|
inherit enableStoneSense;
|
||||||
|
inherit enableTWBT;
|
||||||
};
|
};
|
||||||
|
|
||||||
ptheme =
|
ptheme =
|
||||||
@ -16,10 +18,15 @@ let
|
|||||||
then builtins.getAttr theme themes
|
then builtins.getAttr theme themes
|
||||||
else theme;
|
else theme;
|
||||||
|
|
||||||
|
twbtOnlyWithDFHack = assert (enableDFHack || !enableTWBT); true;
|
||||||
|
|
||||||
|
unBool = b: if b then "YES" else "NO";
|
||||||
|
|
||||||
# These are in inverse order for first packages to override the next ones.
|
# These are in inverse order for first packages to override the next ones.
|
||||||
themePkg = lib.optional (theme != null) ptheme;
|
themePkg = lib.optional (theme != null) ptheme;
|
||||||
pkgs = lib.optional enableDFHack dfhack_
|
pkgs = lib.optional enableDFHack dfhack_
|
||||||
++ lib.optional enableSoundSense soundSense
|
++ lib.optional enableSoundSense soundSense
|
||||||
|
++ lib.optional enableTWBT twbt.art
|
||||||
++ [ dwarf-fortress-original ];
|
++ [ dwarf-fortress-original ];
|
||||||
|
|
||||||
env = buildEnv {
|
env = buildEnv {
|
||||||
|
Loading…
Reference in New Issue
Block a user