summary refs log tree commit diff
path: root/pkgs/games/nethack
diff options
context:
space:
mode:
authorStanisław Pitucha <git@viraptor.info>2023-03-21 14:00:04 +1100
committerStanisław Pitucha <git@viraptor.info>2023-03-21 14:00:04 +1100
commitc4ee55d6617a9c8e6bd7a5e66356a38ae211e8f0 (patch)
tree67939e3606e853790dc9660d1837dde7d41a6856 /pkgs/games/nethack
parent79ac6c8fda5bfaec8cb2543787ca5cc04520be34 (diff)
nethack-qt: fix darwin build
Diffstat (limited to 'pkgs/games/nethack')
-rw-r--r--pkgs/games/nethack/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix
index 08599cccb212a..46e4dc9ca20b9 100644
--- a/pkgs/games/nethack/default.nix
+++ b/pkgs/games/nethack/default.nix
@@ -85,6 +85,9 @@ in stdenv.mkDerivation rec {
       -i sys/unix/Makefile.*
     ''}
     sed -i -e '/rm -f $(MAKEDEFS)/d' sys/unix/Makefile.src
+    # Fix building on darwin where otherwise __has_attribute fails with an empty parameter
+    sed -e 's/define __warn_unused_result__ .*/define __warn_unused_result__ __unused__/' -i include/tradstdc.h
+    sed -e 's/define warn_unused_result .*/define warn_unused_result __unused__/' -i include/tradstdc.h
   '';
 
   configurePhase = ''