summary refs log tree commit diff
path: root/pkgs/games/dwarf-fortress
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/dwarf-fortress')
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/default.nix1
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch23
-rw-r--r--pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix1
3 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix
index 3acd556e80cc..baad45298441 100644
--- a/pkgs/games/dwarf-fortress/dfhack/default.nix
+++ b/pkgs/games/dwarf-fortress/dfhack/default.nix
@@ -46,6 +46,7 @@ let
       fetchSubmodules = true;
     };
 
+    patches = [ ./fix-stonesense.patch ];
     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/dfhack/fix-stonesense.patch b/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch
new file mode 100644
index 000000000000..da860cd55624
--- /dev/null
+++ b/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch
@@ -0,0 +1,23 @@
+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/dwarf-therapist/wrapper.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix
index 334c7ebbf6fc..54f0f0405ac5 100644
--- a/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix
+++ b/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix
@@ -19,6 +19,7 @@ in symlinkJoin {
     # therefore uses many relative paths.
     wrapProgram $out/bin/dwarftherapist \
       --run "cd $out/share/dwarftherapist"
+    ln -s $out/bin/dwarftherapist $out/bin/DwarfTherapist
 
     rm -rf $out/share/dwarftherapist/memory_layouts/linux
     mkdir -p $out/share/dwarftherapist/memory_layouts/linux