diff options
Diffstat (limited to 'nixpkgs/pkgs/games/dwarf-fortress')
3 files changed, 34 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/games/dwarf-fortress/dfhack/default.nix b/nixpkgs/pkgs/games/dwarf-fortress/dfhack/default.nix index bd37f6180b1..11c21b82c29 100644 --- a/nixpkgs/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/nixpkgs/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -1,5 +1,5 @@ { stdenv, buildEnv, lib, fetchFromGitHub, cmake, writeScriptBin -, perl, XMLLibXML, XMLLibXSLT, zlib +, perl, XMLLibXML, XMLLibXSLT, zlib, ruby , enableStoneSense ? false, allegro5, libGLU, libGL , enableTWBT ? true, twbt , SDL @@ -53,10 +53,10 @@ let prerelease = true; }; "0.47.04" = { - dfHackRelease = "0.47.04-alpha0"; - sha256 = "07056k6717mqim9skwjprqplj8jmmli6g4p2c72c8000jwnn2hjy"; - xmlRev = "23500e4e9bd1885365d0a2ef1746c321c1dd50aa"; - prerelease = true; + dfHackRelease = "0.47.04-r2"; + sha256 = "18ppn1dqaxi6ahjzsvb9kw70rvca106a1hibhzc4rxmraypnqb89"; + xmlRev = "036b662a1bbc96b4911f3cbe74dfa1243b6459bc"; + prerelease = false; }; }; @@ -109,6 +109,19 @@ let }; patches = [ ./fix-stonesense.patch ]; + + # As of + # https://github.com/DFHack/dfhack/commit/56e43a0dde023c5a4595a22b29d800153b31e3c4, + # dfhack gets its goodies from the directory above the Dwarf_Fortress + # executable, which leads to stock Dwarf Fortress and not the built + # environment where all the dfhack resources are symlinked to (typically + # ~/.local/share/df_linux). This causes errors like `tweak is not a + # recognized command` to be reported and dfhack to lose some of its + # functionality. + postPatch = '' + sed -i 's@cached_path = path_string.*@cached_path = getenv("DF_DIR");@' library/Process-linux.cpp + ''; + nativeBuildInputs = [ cmake perl XMLLibXML XMLLibXSLT fakegit ]; # We don't use system libraries because dfhack needs old C++ ABI. buildInputs = [ zlib SDL ] @@ -127,6 +140,12 @@ let cmakeFlags = [ "-DDFHACK_BUILD_ARCH=${arch}" "-DDOWNLOAD_RUBY=OFF" ] ++ lib.optionals enableStoneSense [ "-DBUILD_STONESENSE=ON" "-DSTONESENSE_INTERNAL_SO=OFF" ]; + # dfhack expects an unversioned libruby.so to be present in the hack + # subdirectory for ruby plugins to function. + postInstall = '' + ln -s ${ruby}/lib/libruby-*.so $out/hack/libruby.so + ''; + enableParallelBuilding = true; }; in diff --git a/nixpkgs/pkgs/games/dwarf-fortress/twbt/default.nix b/nixpkgs/pkgs/games/dwarf-fortress/twbt/default.nix index b5bff0e9b7a..a0990e04f93 100644 --- a/nixpkgs/pkgs/games/dwarf-fortress/twbt/default.nix +++ b/nixpkgs/pkgs/games/dwarf-fortress/twbt/default.nix @@ -42,9 +42,10 @@ let prerelease = false; }; "0.47.04" = { - twbtRelease = "6.61"; - sha256 = "07bqy9rkd64h033sxdpigp5zq4xrr0xd36wdr1b21g649mv8j6yw"; - prerelease = false; + twbtRelease = "6.xx"; + dfhackRelease = "0.47.04-r2"; + sha256 = "092dgp8fh1j4nqr9wbzn89ib1nhscclr8m91lfxsvg0mgn7j8xlv"; + prerelease = true; }; }; @@ -58,7 +59,11 @@ stdenvNoCC.mkDerivation rec { version = release.twbtRelease; src = fetchurl { - url = "https://github.com/mifki/df-twbt/releases/download/v${version}/twbt-${version}-linux.zip"; + 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"; sha256 = release.sha256; }; diff --git a/nixpkgs/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in b/nixpkgs/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in index 054935af012..b041067d89e 100644 --- a/nixpkgs/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in +++ b/nixpkgs/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in @@ -1,6 +1,6 @@ shopt -s extglob -[ -z "$DF_DIR" ] && DF_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/df_linux" +[ -z "$DF_DIR" ] && export DF_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/df_linux" env_dir="@env@" exe="$env_dir/@exe@" |