summaryrefslogtreecommitdiffstats
path: root/pkgs/games/dwarf-fortress
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2020-08-21 13:54:25 -0700
committerJon <jonringer@users.noreply.github.com>2020-08-21 14:45:53 -0700
commit5db4a6538498b55ad1fc9c13ba33fee242c1453d (patch)
tree5da8cc7534c3abbe2be008b58d22ca8ea9577c1d /pkgs/games/dwarf-fortress
parentb6d657adbef938aab89ca7df3a1a7f60fef59828 (diff)
dfhack: 0.47.04-alpha0 -> 0.47.04-r2
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.
Diffstat (limited to 'pkgs/games/dwarf-fortress')
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/default.nix21
-rw-r--r--pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in2
2 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix
index bd37f6180b14..03ce8a285aba 100644
--- a/pkgs/games/dwarf-fortress/dfhack/default.nix
+++ b/pkgs/games/dwarf-fortress/dfhack/default.nix
@@ -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 ]
diff --git a/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in b/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in
index 054935af012e..b041067d89e4 100644
--- a/pkgs/games/dwarf-fortress/wrapper/dwarf-fortress-init.in
+++ b/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@"