summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-03-18 18:02:14 +0100
committerDaiderd Jordan <daiderd@gmail.com>2018-03-18 18:02:29 +0100
commitec15ef011a4488a4eb77b114bc3d03797dff43d3 (patch)
tree94953834f900dea24e2256d4b90618e8e77780b0
parent4fe75d11b2efdd3325ee8eaa4347626f1a950dbd (diff)
downloadnixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.tar
nixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.tar.gz
nixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.tar.bz2
nixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.tar.lz
nixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.tar.xz
nixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.tar.zst
nixlib-ec15ef011a4488a4eb77b114bc3d03797dff43d3.zip
gnu-apl: fix clang build
/cc ZHF #36454
-rw-r--r--pkgs/development/interpreters/gnu-apl/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix
index 2f5ce0e76350..599126d2eff9 100644
--- a/pkgs/development/interpreters/gnu-apl/default.nix
+++ b/pkgs/development/interpreters/gnu-apl/default.nix
@@ -1,6 +1,5 @@
 { stdenv, fetchurl, readline, gettext, ncurses }:
 
-with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "gnu-apl-${version}";
   version = "1.7";
@@ -13,9 +12,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ readline gettext ncurses ];
 
   # Needed with GCC 7
-  NIX_CFLAGS_COMPILE = "-Wno-error=int-in-bool-context";
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=int-in-bool-context"
+    + stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=null-dereference";
 
-  patchPhase = optionalString stdenv.isDarwin ''
+  patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
     substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"
   '';
 
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     find $out/share/doc/support-files -name 'Makefile*' -delete
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Free interpreter for the APL programming language";
     homepage    = http://www.gnu.org/software/apl/;
     license     = licenses.gpl3Plus;