Skip to content

Commit

Permalink
fix even more clang builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Taylor committed Aug 24, 2014
1 parent a5a82fa commit 62f59bc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
9 changes: 9 additions & 0 deletions pkgs/development/libraries/libdevil/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ stdenv.mkDerivation rec {

configureFlags = [ "--enable-ILU" "--enable-ILUT" ];

preConfigure = ''
sed -i 's, -std=gnu99,,g' configure
sed -i 's,malloc.h,stdlib.h,g' src-ILU/ilur/ilur.c
'';

postConfigure = ''
sed -i '/RESTRICT_KEYWORD/d' include/IL/config.h
'';

patches =
[ ( fetchurl {
url = http://patch-tracker.debian.org/patch/series/dl/devil/1.7.8-6.1/03_CVE-2009-3994.diff;
Expand Down
5 changes: 4 additions & 1 deletion pkgs/servers/x11/xorg/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ in
# Note: most of these are in Requires.private, so maybe builder.sh
# should propagate them automatically.
libXt = attrs: attrs // {
preConfigure = setMalloc0ReturnsNullCrossCompiling;
preConfigure = setMalloc0ReturnsNullCrossCompiling + ''
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
'';
propagatedBuildInputs = [ xorg.libSM ];
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
};

# See https://bugs.freedesktop.org/show_bug.cgi?id=47792
Expand Down
5 changes: 5 additions & 0 deletions pkgs/stdenv/adapters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,9 @@ rec {
''; # */
in overrideGCC stdenv (stdenv.gcc.override { binutils = binutils'; });

dropCxx = drv: drv.override {
stdenv = if pkgs.stdenv.isDarwin
then pkgs.allStdenvs.stdenvDarwinNaked
else pkgs.stdenv;
};
}
8 changes: 4 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4427,7 +4427,7 @@ let

coredumper = callPackage ../development/libraries/coredumper { };

ctl = callPackage ../development/libraries/ctl { };
ctl = dropCxx (callPackage ../development/libraries/ctl { });

cpp-netlib = callPackage ../development/libraries/cpp-netlib { };

Expand Down Expand Up @@ -4962,7 +4962,7 @@ let

ilixi = callPackage ../development/libraries/ilixi { };

ilmbase = callPackage ../development/libraries/ilmbase { };
ilmbase = dropCxx (callPackage ../development/libraries/ilmbase { });

imlib = callPackage ../development/libraries/imlib {
libpng = libpng12;
Expand Down Expand Up @@ -5139,7 +5139,7 @@ let

libdc1394avt = callPackage ../development/libraries/libdc1394avt { };

libdevil = callPackage ../development/libraries/libdevil { };
libdevil = dropCxx (callPackage ../development/libraries/libdevil { });

libdiscid = callPackage ../development/libraries/libdiscid { };

Expand Down Expand Up @@ -5874,7 +5874,7 @@ let
# this ctl version is needed by openexr_viewers
openexr_ctl = callPackage ../development/libraries/openexr_ctl { };

openexr = callPackage ../development/libraries/openexr { };
openexr = dropCxx (callPackage ../development/libraries/openexr { });

openldap = callPackage ../development/libraries/openldap { };

Expand Down

0 comments on commit 62f59bc

Please sign in to comment.