diff options
author | Naïm Favier <n@monade.li> | 2022-11-16 23:35:40 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-11-17 09:50:52 +0100 |
commit | e786b3ec21bd7a722d7eb4839baaf941f8de061a (patch) | |
tree | f363bc9ace779ec633a1450e106bc9abc28726a2 /pkgs/games | |
parent | cff44486bc580eb18d243002409c1caabd600964 (diff) |
dwarf-fortress.dfhack: updates and fixes
Updates the release number for the latest two DF versions, and fixes some
older ones.
Notable change from 0.47.05-r7: dfhack.init was moved into
dfhack-config/init.
https://github.com/DFHack/dfhack/releases/tag/0.47.05-r7
https://github.com/DFHack/dfhack/releases/tag/0.47.04-r5
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/dwarf-fortress/dfhack/default.nix | 31 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch | 23 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/twbt/default.nix | 8 |
3 files changed, 26 insertions, 36 deletions
diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index 57bbf0e11625..ca7ddf4e16b5 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -2,6 +2,7 @@ , buildEnv , lib , fetchFromGitHub +, fetchpatch , cmake , writeScriptBin , perl @@ -64,22 +65,24 @@ let prerelease = true; }; "0.47.04" = { - dfHackRelease = "0.47.04-r2"; - sha256 = "18ppn1dqaxi6ahjzsvb9kw70rvca106a1hibhzc4rxmraypnqb89"; - xmlRev = "036b662a1bbc96b4911f3cbe74dfa1243b6459bc"; + dfHackRelease = "0.47.04-r5"; + sha256 = "sha256-0s+/LKbqsS/mrxKPDeniqykE5+Gy3ZzCa8yEDzMyssY="; + xmlRev = "be0444cc165a1abff053d5893dc1f780f06526b7"; prerelease = false; }; "0.47.05" = { - dfHackRelease = "0.47.05-r1"; - sha256 = "sha256-B0iv7fpIcnaO8sx9wPqI7/WuyLK15p8UYlYIcF5F5bw="; - xmlRev = "11c379ffd31255f2a1415d98106114a46245e1c3"; + dfHackRelease = "0.47.05-r7"; + sha256 = "sha256-vBKUTSjfCnalkBzfjaIKcxUuqsGGOTtoJC1RHJIDlNc="; + xmlRev = "f5019a5c6f19ef05a28bd974c3e8668b78e6e2a4"; prerelease = false; }; }; release = - if hasAttr dfVersion dfhack-releases + if lib.isAttrs dfVersion + then dfVersion + else if hasAttr dfVersion dfhack-releases then getAttr dfVersion dfhack-releases else throw "[DFHack] Unsupported Dwarf Fortress version: ${dfVersion}"; @@ -127,10 +130,20 @@ in fetchSubmodules = true; }; - patches = [ ./fix-stonesense.patch ]; + patches = lib.optional (lib.versionOlder version "0.44.12-r3") (fetchpatch { + name = "fix-stonesense.patch"; + url = "https://github.com/DFHack/stonesense/commit/f5be6fe5fb192f01ae4551ed9217e97fd7f6a0ae.patch"; + extraPrefix = "plugins/stonesense/"; + stripLen = 1; + hash = "sha256-wje6Mkct29eyMOcJnbdefwBOLJko/s4JcJe52ojuW+8="; + }) ++ lib.optional (lib.versionOlder version "0.47.04-r1") (fetchpatch { + name = "fix-protobuf.patch"; + url = "https://github.com/DFHack/dfhack/commit/7bdf958518d2892ee89a7173224a069c4a2190d8.patch"; + hash = "sha256-p+mKhmYbnhWKNiGPMjbYO505Gcg634n0nudqH0NX3KY="; + }); # gcc 11 fix - NIX_CFLAGS_COMPILE = "-fpermissive"; + NIX_CFLAGS_COMPILE = lib.optionalString (lib.versionOlder version "0.47.05-r3") "-fpermissive"; # As of # https://github.com/DFHack/dfhack/commit/56e43a0dde023c5a4595a22b29d800153b31e3c4, diff --git a/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch b/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch deleted file mode 100644 index da860cd55624..000000000000 --- a/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch +++ /dev/null @@ -1,23 +0,0 @@ -From f5be6fe5fb192f01ae4551ed9217e97fd7f6a0ae Mon Sep 17 00:00:00 2001 -From: Herwig Hochleitner <hhochleitner@gmail.com> -Date: Sun, 1 Oct 2017 18:01:43 +0200 -Subject: [PATCH] include <GL/glext.h> - -this fixes `GLhandleARB` not being defined ---- - plugins/stonesense/common.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/stonesense/common.h b/plugins/stonesense/common.h -index eb36691..ef45389 100644 ---- a/plugins/stonesense/common.h -+++ b/plugins/stonesense/common.h -@@ -31,6 +31,8 @@ using namespace df::enums; - #include <allegro5/allegro_opengl.h> - #include <allegro5/utf8.h> - -+#include <GL/glext.h> -+ - // allegro leaks X headers, undef some of it here: - #undef TileShape - #undef None
\ No newline at end of file diff --git a/pkgs/games/dwarf-fortress/twbt/default.nix b/pkgs/games/dwarf-fortress/twbt/default.nix index 7d2816d97a4a..1188265f7415 100644 --- a/pkgs/games/dwarf-fortress/twbt/default.nix +++ b/pkgs/games/dwarf-fortress/twbt/default.nix @@ -46,14 +46,14 @@ let }; "0.47.04" = { twbtRelease = "6.xx"; - dfhackRelease = "0.47.04-r2"; - sha256 = "092dgp8fh1j4nqr9wbzn89ib1nhscclr8m91lfxsvg0mgn7j8xlv"; + dfhackRelease = "0.47.04-r5"; + sha256 = "sha256-+C3g4KJShCb2VXGQ4mtkDOufXZQ1P+ebDTmUzL3tNyU="; prerelease = true; }; "0.47.05" = { twbtRelease = "6.xx"; - dfhackRelease = "0.47.05-r1"; - sha256 = "1nqhaf7271bm9rq9dmilhhk9q7v3841d0rv4y3fid40vfi4gpi3p"; + dfhackRelease = "0.47.05-r7"; + sha256 = "sha256-4xMKuSP5J6pMK+hwjTAcTI0gsLJfw+Xt+vh9CopR4tk="; prerelease = true; }; }; |