summary refs log tree commit diff
path: root/pkgs/games/nethack
diff options
context:
space:
mode:
authorMatthew Bauer <matthew.bauer@obsidian.systems>2018-08-08 11:36:21 -0400
committerMatthew Bauer <matthew.bauer@obsidian.systems>2018-08-08 11:37:34 -0400
commit29b5ca82eebaf0489702dc984f955be60a46d129 (patch)
treec5730a9adcee58f78d74330cb87a6cb4e92bb8cf /pkgs/games/nethack
parent565479374b6d06725f4ac69cda868e93c9678b9a (diff)
downloadnixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.tar
nixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.tar.gz
nixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.tar.bz2
nixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.tar.lz
nixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.tar.xz
nixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.tar.zst
nixpkgs-29b5ca82eebaf0489702dc984f955be60a46d129.zip
nethack: remove debug symbols
These were adding gcc to the closure
Diffstat (limited to 'pkgs/games/nethack')
-rw-r--r--pkgs/games/nethack/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix
index d4ad1119b9f..3f9ec93f861 100644
--- a/pkgs/games/nethack/default.nix
+++ b/pkgs/games/nethack/default.nix
@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
 
   makeFlags = [ "PREFIX=$(out)" ];
 
-  patchPhase = ''
+  postPatch = ''
     sed -e '/^ *cd /d' -i sys/unix/nethack.sh
     sed \
       -e 's/^YACC *=.*/YACC = bison -y/' \
@@ -53,6 +53,7 @@ in stdenv.mkDerivation rec {
             `pkg-config Qt5Multimedia --libs`,' \
       -i sys/unix/Makefile.src
     sed \
+      -e 's,^CFLAGS=-g,CFLAGS=,' \
       -e 's,/bin/gzip,${gzip}/bin/gzip,g' \
       -e 's,^WINTTYLIB=.*,WINTTYLIB=-lncurses,' \
       -i sys/unix/hints/linux
@@ -60,6 +61,7 @@ in stdenv.mkDerivation rec {
       -e 's,^CC=.*$,CC=cc,' \
       -e 's,^HACKDIR=.*$,HACKDIR=\$(PREFIX)/games/lib/\$(GAME)dir,' \
       -e 's,^SHELLDIR=.*$,SHELLDIR=\$(PREFIX)/games,' \
+      -e 's,^CFLAGS=-g,CFLAGS=,' \
       -i sys/unix/hints/macosx10.10
     sed -e '/define CHDIR/d' -i include/config.h
     sed \
@@ -71,11 +73,11 @@ in stdenv.mkDerivation rec {
   '';
 
   configurePhase = ''
-    cd sys/${platform}
+    pushd sys/${platform}
     ${lib.optionalString (platform == "unix") ''
       sh setup.sh hints/${unixHint}
     ''}
-    cd ../..
+    popd
   '';
 
   postInstall = ''