From d0888d150333a2c523cd1e46606d6219afe23dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 21 Aug 2018 12:05:01 +0200 Subject: [PATCH] treewide: fixup breakage due to absolute compiler path Some packages just can't handle them #44767. It was tempting to try to abstract this in some way, but I didn't do that ATM. --- pkgs/applications/graphics/exrtools/default.nix | 5 +++++ pkgs/applications/misc/kiwix/default.nix | 5 +++++ pkgs/applications/science/logic/aiger/default.nix | 3 +++ pkgs/applications/science/logic/verit/default.nix | 5 +++++ pkgs/applications/virtualization/open-vm-tools/default.nix | 5 +++++ pkgs/development/libraries/podofo/default.nix | 5 +++++ pkgs/development/libraries/zeroc-ice/default.nix | 5 +++++ pkgs/development/ocaml-modules/zarith/default.nix | 3 +++ pkgs/games/warmux/default.nix | 5 +++++ pkgs/games/warzone2100/default.nix | 5 +++++ 10 files changed, 46 insertions(+) diff --git a/pkgs/applications/graphics/exrtools/default.nix b/pkgs/applications/graphics/exrtools/default.nix index 7980d09fed12..01af81d4de74 100644 --- a/pkgs/applications/graphics/exrtools/default.nix +++ b/pkgs/applications/graphics/exrtools/default.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { sha256 = "0jpkskqs1yjiighab4s91jy0c0qxcscwadfn94xy2mm2bx2qwp4z"; }; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ stdenv openexr libpng12 libjpeg ]; diff --git a/pkgs/applications/misc/kiwix/default.nix b/pkgs/applications/misc/kiwix/default.nix index c37d26f3dbcc..cfba3a0c83d1 100644 --- a/pkgs/applications/misc/kiwix/default.nix +++ b/pkgs/applications/misc/kiwix/default.nix @@ -81,6 +81,11 @@ stdenv.mkDerivation rec { cd ../../.. ''; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + configureFlags = [ "--disable-static" "--disable-staticbins" diff --git a/pkgs/applications/science/logic/aiger/default.nix b/pkgs/applications/science/logic/aiger/default.nix index 03524fc6b222..a03e777a033e 100644 --- a/pkgs/applications/science/logic/aiger/default.nix +++ b/pkgs/applications/science/logic/aiger/default.nix @@ -12,6 +12,9 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; configurePhase = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + # Set up picosat, so we can build 'aigbmc' mkdir ../picosat ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h diff --git a/pkgs/applications/science/logic/verit/default.nix b/pkgs/applications/science/logic/verit/default.nix index ca3673d7bf97..d8873604b213 100644 --- a/pkgs/applications/science/logic/verit/default.nix +++ b/pkgs/applications/science/logic/verit/default.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation rec { # --disable-static actually enables static linking here... dontDisableStatic = true; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}gcc + CXX=${stdenv.cc.targetPrefix}g++ + ''; + makeFlags = [ "LEX=${flex}/bin/flex" ]; preInstall = '' diff --git a/pkgs/applications/virtualization/open-vm-tools/default.nix b/pkgs/applications/virtualization/open-vm-tools/default.nix index e42c1d5dd1e4..13fa9d369b60 100644 --- a/pkgs/applications/virtualization/open-vm-tools/default.nix +++ b/pkgs/applications/virtualization/open-vm-tools/default.nix @@ -41,6 +41,11 @@ stdenv.mkDerivation rec { sed -i 's,/sbin/shutdown,shutdown,' lib/system/systemLinux.c ''; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + configureFlags = [ "--without-kernel-modules" "--without-xmlsecurity" ] ++ lib.optional (!withX) "--without-x"; diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix index 9a43470de3b7..51e2b5059749 100644 --- a/pkgs/development/libraries/podofo/default.nix +++ b/pkgs/development/libraries/podofo/default.nix @@ -19,6 +19,11 @@ stdenv.mkDerivation rec { # TODO(@Dridus) remove the ++ libc at next hash break buildInputs = [ lua5 ] ++ stdenv.lib.optional stdenv.isLinux stdenv.cc.libc; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + cmakeFlags = "-DPODOFO_BUILD_SHARED=ON -DPODOFO_BUILD_STATIC=OFF"; meta = { diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix index 063d64c69058..4369a9765e58 100644 --- a/pkgs/development/libraries/zeroc-ice/default.nix +++ b/pkgs/development/libraries/zeroc-ice/default.nix @@ -27,6 +27,11 @@ stdenv.mkDerivation rec { --replace xcrun "" ''; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + makeFlags = [ "prefix=$(out)" "OPTIMIZE=yes" ]; enableParallelBuilding = true; diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix index e5d954970589..7b76919241de 100644 --- a/pkgs/development/ocaml-modules/zarith/default.nix +++ b/pkgs/development/ocaml-modules/zarith/default.nix @@ -28,7 +28,10 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gmp ]; patchPhase = "patchShebangs ./z_pp.pl"; + configurePhase = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib ''; preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib"; diff --git a/pkgs/games/warmux/default.nix b/pkgs/games/warmux/default.nix index a56afbbf44b5..29e8042ac7ac 100644 --- a/pkgs/games/warmux/default.nix +++ b/pkgs/games/warmux/default.nix @@ -19,6 +19,11 @@ stdenv.mkDerivation rec { gettext intltool libtool perl ]; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + configureFlagsArray = ("CFLAGS=-include ${zlib.dev}/include/zlib.h"); patches = [ ./gcc-fix.patch ]; diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix index 6165cacfdca5..65e5669d86a6 100644 --- a/pkgs/games/warzone2100/default.nix +++ b/pkgs/games/warzone2100/default.nix @@ -30,6 +30,11 @@ stdenv.mkDerivation rec { --replace "which %s" "${which}/bin/which %s" ''; + preConfigure = '' + CC=${stdenv.cc.targetPrefix}cc + CXX=${stdenv.cc.targetPrefix}c++ + ''; + configureFlags = [ "--with-distributor=NixOS" ]; hardeningDisable = [ "format" ];