gnu-apl: fix clang build

/cc ZHF #36454
This commit is contained in:
Daiderd Jordan 2018-03-18 18:02:14 +01:00
parent 4fe75d11b2
commit ec15ef011a
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -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;