Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dwarf-fortress: dfhack and TWBT fixes #95934

Merged
merged 3 commits into from Aug 21, 2020
Merged

dwarf-fortress: dfhack and TWBT fixes #95934

merged 3 commits into from Aug 21, 2020

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Aug 21, 2020

Motivation for this change

I recently got into Dwarf Fortress, and some things were not working as expected.

  • dfhack itself was out of date (there now exists an r2 release, which is considerably newer than the alpha0 release).
    • In this release, some path handling was reworked, so we need to patch the source in order for dfhack to find its utilities (like the tweak plugin). See the commit message for more information: c936f7a.
  • dfhack was complaining about being unable to initialize Ruby plugins, so I fixed it (not that I use Ruby plugins -- please let me know if this actually works). See the commit message for more information: 0bf4486.
  • TWBT was out of date for dfhack 0.47.04 -- there exists a fork adding support for this, so switch to it when using dfhack 0.47.04. See the commit message for more information: f35ccaf.
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Closes #88497 (superceded).
Resolves #56013 (dfhack doesn't load to a black screen for me; I've also resolved the dfhack + twbt compat issue).
Resolves #56485 (dfhack no longer complains about being unable to load the ruby library).

cc @srhb

EDIT: Sorry for the ping, Jon. Clicked on your name by mistake x)

As of
DFHack/dfhack@56e43a0,
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.
dfhack expects an unversioned libruby.so to be present in the hack
subdirectory for ruby plugins to function. The glob is necessary,
because the ruby package's library names are formatted as
ruby-${version}.so for whatever reason. The glob makes it possible for
ruby to update without manual intervention being needed here.
The original mifki TWBT hasn't been updated since April 2019, while
thurin's fork has added support for dfhack 0.47.04-r2. Thus, switch to
thurin's fork when Dwarf Fortress 0.47.04 is used (and ever-so-slightly
special case the url attribute).
@jonringer
Copy link
Contributor

jonringer commented Aug 21, 2020

i still play dwarf-fortress, and i did the last upstream bump :)

EDIT: I just play vanilla with phoebus tileset. Never used dfhack

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff LGTM
was able to load old fortress

https://github.com/NixOS/nixpkgs/pull/95934
10 packages built:
dwarf-fortress dwarf-fortress-packages.dwarf-fortress-full dwarf-fortress-packages.dwarf-fortress_0_43_05 dwarf-fortress-packages.dwarf-fortress_0_44_05 dwarf-fortress-packages.dwarf-fortress_0_44_09 dwarf-fortress-packages.dwarf-fortress_0_44_10 dwarf-fortress-packages.dwarf-fortress_0_44_11 dwarf-fortress-packages.dwarf-fortress_0_44_12 dwarf-fortress-packages.dwarf-fortress_0_47_01 dwarf-fortress-packages.dwarf-fortress_0_47_02

@jonringer jonringer merged commit e2b09f4 into NixOS:master Aug 21, 2020
@cole-h cole-h deleted the df-fixes branch August 22, 2020 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants