From 1bbcc160cd7e46a79009f39fe898e9a609449c8e Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 3 Jan 2026 18:25:05 +0100 Subject: [PATCH] dwarf-fortress: fix build - part of: https://github.com/NixOS/nixpkgs/issues/445447 It also seems that the previous CMakeLists patche was committed upstream. Lastly, adds a missing `` header --- pkgs/games/dwarf-fortress/unfuck.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix index 4d47e4102575..174470b7368c 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -66,11 +66,18 @@ stdenv.mkDerivation { url = "https://github.com/svenstaro/dwarf_fortress_unfuck/commit/6dcfe5ae869fddd51940c6c37a95f7bc639f4389.patch"; hash = "sha256-b9eI3iR7dmFqCrktPyn6QJ9U2A/7LvfYRS+vE3BOaqk="; }) + (fetchpatch { + name = "use-the-glew-cmake-target.patch"; + url = "https://github.com/svenstaro/dwarf_fortress_unfuck/commit/abd2961836ace8cf6277ceff997b02704c6edd7a.patch"; + hash = "sha256-2VS/Mvhl6oLoMcH4x3hX9RO0VrHha8hhkdKwN0ZfUTs="; + }) ]; postPatch = '' - # https://github.com/svenstaro/dwarf_fortress_unfuck/pull/27 - substituteInPlace CMakeLists.txt --replace \''${GLEW_LIBRARIES} GLEW::glew + substituteInPlace CMakeLists.txt \ + --replace-fail "cmake_minimum_required(VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)" + + sed -i "1i #include " g_src/files.h ''; cmakeFlags = [