From 863f11c18d25970068555bd2d7e5d0aa8cc41873 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 14 Jun 2018 08:49:27 -0700 Subject: [PATCH 01/12] conan: 1.2.3 -> 1.4.4 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/conan/versions. These checks were done: - built on NixOS - Warning: no invocation of /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4/bin/.conan_server-wrapped had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4/bin/conan_server had a zero exit code or showed the expected version - /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4/bin/.conan_build_info-wrapped passed the binary check. - /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4/bin/conan_build_info passed the binary check. - Warning: no invocation of /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4/bin/.conan-wrapped had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4/bin/conan had a zero exit code or showed the expected version - 2 of 6 passed binary check by having a zero exit code. - 0 of 6 passed binary check by having the new version present in output. - found 1.4.4 with grep in /nix/store/pdza6q7n1rywgra2022zvbi05fj47kjy-conan-1.4.4 - directory tree listing: https://gist.github.com/0da299922c958da51520fdd195a2d369 - du listing: https://gist.github.com/7e5d6a9b06f35b233151c026f6dd089b --- pkgs/development/tools/build-managers/conan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index 849c722e554..3aab715e4d9 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -20,12 +20,12 @@ let newPython = python.override { }; in newPython.pkgs.buildPythonApplication rec { - version = "1.2.3"; + version = "1.4.4"; pname = "conan"; src = newPython.pkgs.fetchPypi { inherit pname version; - sha256 = "623e92d99cd0f4ec92552b23af66a6bb066071e213659f502480bb9a96d7be23"; + sha256 = "1g03f8rw9l198w9ph0gi0q3g84ilp1dxxc9nmj0dgnymcfgpf89n"; }; checkInputs = with newPython.pkgs; [ From 9c3af34e13f44b35e204c157eb101acf98450288 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 14 Jun 2018 09:14:23 -0700 Subject: [PATCH 02/12] blink1-tool: 1.98 -> 1.98a Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/blink1/versions. These checks were done: - built on NixOS - /nix/store/8fdnsv83lcjc6fkg2n3yfvkyz1np0k20-blink1-1.98a/bin/blink1-tool passed the binary check. - 1 of 1 passed binary check by having a zero exit code. - 0 of 1 passed binary check by having the new version present in output. - directory tree listing: https://gist.github.com/0cc79e1e579091f9661ad91db1c61635 - du listing: https://gist.github.com/d2a0ee9aeb4e55c5008d64241727682d --- pkgs/tools/misc/blink1-tool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/blink1-tool/default.nix b/pkgs/tools/misc/blink1-tool/default.nix index e87987aa083..4248dd6bd93 100644 --- a/pkgs/tools/misc/blink1-tool/default.nix +++ b/pkgs/tools/misc/blink1-tool/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "blink1-${version}"; - version = "1.98"; + version = "1.98a"; src = fetchurl { url = "https://github.com/todbot/blink1/archive/v${version}.tar.gz"; - sha256 = "05hbnp20cdvyyqf6jr01waz1ycis20qzsd8hn27snmn6qd48igrb"; + sha256 = "1waci6hccv5i50v5d3z7lx4h224fbkj66ywfynnsgn46w0jm6imv"; }; nativeBuildInputs = [ pkgconfig ]; From 580724655e1b50c9802ffa84de6c9389396d996d Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Thu, 14 Jun 2018 19:43:48 +0200 Subject: [PATCH 03/12] webkitgtk: 2.20.2 -> 2.20.3 This addresses several issues with webkitgtk 2.20.2: - CVE-2018-4190, information leak (credentials) - CVE-2018-4199, arbitrary code execution - CVE-2018-4218, arbitrary code execution - CVE-2018-4222, arbitrary code execution - CVE-2018-4232, cookies might be overriden - CVE-2018-4233, arbitrary code execution - CVE-2018-11646, application crash - CVE-2018-12293, heap buffer overflow --- pkgs/development/libraries/webkitgtk/2.20.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/webkitgtk/2.20.nix b/pkgs/development/libraries/webkitgtk/2.20.nix index 8b25a20d8eb..7c94e824ccc 100644 --- a/pkgs/development/libraries/webkitgtk/2.20.nix +++ b/pkgs/development/libraries/webkitgtk/2.20.nix @@ -15,7 +15,7 @@ assert stdenv.isDarwin -> !enableGtk2Plugins; with stdenv.lib; stdenv.mkDerivation rec { name = "webkitgtk-${version}"; - version = "2.20.2"; + version = "2.20.3"; meta = { description = "Web content rendering engine, GTK+ port"; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://webkitgtk.org/releases/${name}.tar.xz"; - sha256 = "1qi6nnj4qidzija1am9xscwjxwfqwhiy7x39ndriqgzh86i97znz"; + sha256 = "1n0dy94bm7wvxln4jis1gp8plv8n4a01g41724zsf5psg1yk16sp"; }; patches = optionals stdenv.isDarwin [ From aecb983ebb4f3b85c24cf70248264116c12db28c Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 14 Jun 2018 12:38:48 -0700 Subject: [PATCH 04/12] aws-sdk-cpp: 1.4.60 -> 1.4.65 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/aws-sdk-cpp/versions. These checks were done: - built on NixOS - 0 of 0 passed binary check by having a zero exit code. - 0 of 0 passed binary check by having the new version present in output. - found 1.4.65 with grep in /nix/store/g0zw6fdmf5flpnd5mqqjk373ndlq1zwd-aws-sdk-cpp-1.4.65 - directory tree listing: https://gist.github.com/78023eae3b6e7a16a3b9e7fb7fdba55b - du listing: https://gist.github.com/2f4c13728002e11c5b08a8bc5658c21c --- pkgs/development/libraries/aws-sdk-cpp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 5fce7bae8fc..034e8c961be 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -15,13 +15,13 @@ let else throw "Unsupported system!"; in stdenv.mkDerivation rec { name = "aws-sdk-cpp-${version}"; - version = "1.4.60"; + version = "1.4.65"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-sdk-cpp"; rev = version; - sha256 = "0zn1pyhn37w8di9byq5p3y886hsgf5569bmxiqb7bvjcrhnlb83l"; + sha256 = "0266d2gar9wi0p4plapcp4bms93nn61rdvpd8ik5h6hgqvdb3fl2"; }; # FIXME: might be nice to put different APIs in different outputs From 09c3fb055e4624d600eaa061617230fdd10ee98d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 14 Jun 2018 15:44:26 -0400 Subject: [PATCH 05/12] gmp: fix mobile gmp prebuilt building The prebuilt was previously broken in building GMP. We add a --disable-assembly flag to put get GMP to avoid pulling in assembly stuff that breaks. /cc @ericson2314 --- pkgs/development/libraries/gmp/6.x.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index 2635aed3eac..cb2c3f15da8 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -27,12 +27,13 @@ let self = stdenv.mkDerivation rec { # See , for instance. # # no darwin because gmp uses ASM that clang doesn't like - optional (!stdenv.isSunOS) "--enable-fat" + optional (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "--enable-fat" ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]) ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" - ++ optional stdenv.isDarwin "ABI=64" + ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64" ++ optional stdenv.is64bit "--with-pic" + ++ optional (with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt) "--disable-assembly" ; # The config.guess in GMP tries to runtime-detect various @@ -75,7 +76,6 @@ let self = stdenv.mkDerivation rec { asymptotically faster algorithms. ''; - broken = with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt; platforms = platforms.all; maintainers = [ maintainers.peti maintainers.vrthra ]; }; From 7bc2024fb7cd10bef588db721005f175bfe54c2a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 14 Jun 2018 15:50:45 -0400 Subject: [PATCH 06/12] ghc8.4.3: add gmp available check This was left out in 812decd5c1abe497d44d7752fb295b69d6eed100 & should be therer. --- pkgs/development/compilers/ghc/8.4.3.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix index 0fecb1d2962..385c33c22ef 100644 --- a/pkgs/development/compilers/ghc/8.4.3.nix +++ b/pkgs/development/compilers/ghc/8.4.3.nix @@ -15,7 +15,7 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? false, gmp ? null + enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? targetPlatform != hostPlatform @@ -32,8 +32,6 @@ ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" }: -assert !enableIntegerSimple -> gmp != null; - let inherit (bootPkgs) ghc; From 7ce6373077146fd542690b8b15e4c0a698cb91be Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 14 Jun 2018 13:08:36 -0700 Subject: [PATCH 07/12] bibutils: 6.3 -> 6.5 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/bibutils/versions. These checks were done: - built on NixOS - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/bib2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/biblatex2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/copac2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/end2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/endx2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/isi2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/med2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/nbib2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/ris2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/ebi2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/wordbib2xml passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/xml2ads passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/xml2bib passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/xml2end passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/xml2isi passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/xml2ris passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/xml2wordbib passed the binary check. - /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5/bin/modsclean passed the binary check. - 18 of 18 passed binary check by having a zero exit code. - 0 of 18 passed binary check by having the new version present in output. - found 6.5 with grep in /nix/store/cxpy0qdlx26bpkwfvxp77hjj89lkcg0n-bibutils-6.5 - directory tree listing: https://gist.github.com/7adb4b0732974e1615ff601aa185fe77 - du listing: https://gist.github.com/87e8d1fe8d3ee6c61fc25435cc5c5c54 --- pkgs/tools/misc/bibutils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/bibutils/default.nix b/pkgs/tools/misc/bibutils/default.nix index 90a2211235d..d8690855974 100644 --- a/pkgs/tools/misc/bibutils/default.nix +++ b/pkgs/tools/misc/bibutils/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "bibutils-${version}"; - version = "6.3"; + version = "6.5"; src = fetchurl { url = "mirror://sourceforge/bibutils/bibutils_${version}_src.tgz"; - sha256 = "10r5v5xbhsxdh6vq6g2xp6lgmpjdzba83h4m4clfhrzqis8clwqy"; + sha256 = "0bc5b9nyxbcc1y4vrhghj9y9221i34qq384zslfyb0ihkb6kq521"; }; configureFlags = [ "--dynamic" "--install-dir" "$(out)/bin" "--install-lib" "$(out)/lib" ]; From 011cc930d2f1781d6e9e9d16a937adf57d29f7b5 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Thu, 14 Jun 2018 20:47:13 +0000 Subject: [PATCH 08/12] deluge: add patch for libtorrent >=0.16 compat --- pkgs/applications/networking/p2p/deluge/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/p2p/deluge/default.nix b/pkgs/applications/networking/p2p/deluge/default.nix index c6e5d0f3cb3..7ca1e595c35 100644 --- a/pkgs/applications/networking/p2p/deluge/default.nix +++ b/pkgs/applications/networking/p2p/deluge/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, intltool, libtorrentRasterbar, pythonPackages }: +{ stdenv, fetchurl, fetchpatch, intltool, libtorrentRasterbar, pythonPackages }: + pythonPackages.buildPythonPackage rec { name = "deluge-${version}"; version = "1.3.15"; @@ -8,6 +9,14 @@ pythonPackages.buildPythonPackage rec { sha256 = "1467b9hmgw59gf398mhbf40ggaka948yz3afh6022v753c9j7y6w"; }; + patches = [ + # Fix preferences when built against libtorrent >=0.16 + (fetchpatch { + url = "https://git.deluge-torrent.org/deluge/patch/?id=38d7b7cdfde3c50d6263602ffb03af92fcbfa52e"; + sha256 = "0la3i0lkj6yv4725h4kbd07mhfwcb34w7prjl9gxg12q7px6c31d"; + }) + ]; + propagatedBuildInputs = with pythonPackages; [ pyGtkGlade libtorrentRasterbar twisted Mako chardet pyxdg pyopenssl service-identity ]; From 3d811ff18b4fa66e89a40f48eda6caa457119014 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 14 Jun 2018 16:35:57 -0400 Subject: [PATCH 09/12] ghc8.4: build statically on prebuilt iOS Otherwise we run into issues in stage 1 with libffi.dylib unable to be built. It is probably a similar case to the prebuilt Android. /cc @ericson2314 --- pkgs/development/compilers/ghc/8.4.2.nix | 2 +- pkgs/development/compilers/ghc/8.4.3.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.4.2.nix b/pkgs/development/compilers/ghc/8.4.2.nix index d793f0b391a..ac8d76c63ed 100644 --- a/pkgs/development/compilers/ghc/8.4.2.nix +++ b/pkgs/development/compilers/ghc/8.4.2.nix @@ -22,7 +22,7 @@ , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt + enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt && !targetPlatform.useiOSPrebuilt , # Whetherto build terminfo. enableTerminfo ? !targetPlatform.isWindows diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix index 0fecb1d2962..fc6c96d0a8d 100644 --- a/pkgs/development/compilers/ghc/8.4.3.nix +++ b/pkgs/development/compilers/ghc/8.4.3.nix @@ -22,7 +22,7 @@ , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt + enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt && !targetPlatform.useiOSPrebuilt , # Whetherto build terminfo. enableTerminfo ? !targetPlatform.isWindows From 4821a073708ee6ca0cae06ff51322a785b3983db Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 14 Jun 2018 15:34:50 -0700 Subject: [PATCH 10/12] emacsMacport: 26.1-7.0 -> 26.1-7.1 --- pkgs/applications/editors/emacs/macport.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/macport.nix b/pkgs/applications/editors/emacs/macport.nix index 49ea544289f..9a32ea7f19f 100644 --- a/pkgs/applications/editors/emacs/macport.nix +++ b/pkgs/applications/editors/emacs/macport.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { emacsVersion = "26.1"; emacsName = "emacs-${emacsVersion}"; - macportVersion = "7.0"; + macportVersion = "7.1"; name = "emacs-mac-${emacsVersion}-${macportVersion}"; builder = ./builder.sh; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { macportSrc = fetchurl { url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${emacsName}-mac-${macportVersion}.tar.gz"; - sha256 = "02dbasiv1szvlzi0avb7bi9xwpw2lssj3kzbn8pi5vmziqhvgfhz"; + sha256 = "0d2ny54f68v3hjc2g3pkj83xv3yzv0hrwvn2cmpyb0jxjbsb2frc"; }; hiresSrc = fetchurl { From fc9644d4c9c9d29958e9bcf1676d48d4b3026bb4 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 14 Jun 2018 10:22:33 -0400 Subject: [PATCH 11/12] llvm 6: Fix libcxxabi impurity and darwin sanitizers --- .../compilers/llvm/6/compiler-rt.nix | 10 ++++-- pkgs/development/compilers/llvm/6/default.nix | 35 +++++++++---------- pkgs/test/cc-wrapper/default.nix | 2 +- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/pkgs/development/compilers/llvm/6/compiler-rt.nix b/pkgs/development/compilers/llvm/6/compiler-rt.nix index 333818f7dbd..88bccca3647 100644 --- a/pkgs/development/compilers/llvm/6/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/6/compiler-rt.nix @@ -1,4 +1,4 @@ -{ stdenv, version, fetch, cmake, python, llvm }: +{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }: with stdenv.lib; stdenv.mkDerivation rec { name = "compiler-rt-${version}"; @@ -6,12 +6,13 @@ stdenv.mkDerivation rec { src = fetch "compiler-rt" "16m7rvh3w6vq10iwkjrr1nn293djld3xm62l5zasisaprx117k6h"; nativeBuildInputs = [ cmake python llvm ]; + buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; configureFlags = [ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" ]; - outputs = [ "dev" "out" ]; + outputs = [ "out" "dev" ]; patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory @@ -27,5 +28,10 @@ stdenv.mkDerivation rec { --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' ''; + # Hack around weird upsream RPATH bug + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + ln -s "$out/lib"/*/* "$out/lib" + ''; + enableParallelBuilding = true; } diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix index 8fe68bad213..40d602e222e 100644 --- a/pkgs/development/compilers/llvm/6/default.nix +++ b/pkgs/development/compilers/llvm/6/default.nix @@ -23,9 +23,19 @@ let tools = stdenv.lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); + mkExtraBuildCommands = cc: '' + rsrc="$out/resource-root" + mkdir "$rsrc" + ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" + ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" + echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux '' + echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + ''; in { llvm = overrideManOutput (callPackage ./llvm.nix { }); + clang-unwrapped = overrideManOutput (callPackage ./clang { inherit clang-tools-extra_src; }); @@ -38,16 +48,11 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - extraPackages = [ libstdcxxHook targetLlvmLibraries.compiler-rt ]; - extraBuildCommands = '' - rsrc="$out/resource-root" - mkdir "$rsrc" - ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" - ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" - echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags - ''; + extraPackages = [ + libstdcxxHook + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = mkExtraBuildCommands cc; }; libcxxClang = wrapCCWith rec { @@ -57,15 +62,7 @@ let targetLlvmLibraries.libcxxabi targetLlvmLibraries.compiler-rt ]; - extraBuildCommands = '' - rsrc="$out/resource-root" - mkdir "$rsrc" - ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" - ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" - echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags - ''; + extraBuildCommands = mkExtraBuildCommands cc; }; lld = callPackage ./lld.nix {}; diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 7061adb8e88..dd41cd157ca 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -3,7 +3,7 @@ with stdenv.lib; let # Sanitizers are not supported on Darwin. # Sanitizer headers aren't available in older libc++ stdenvs due to a bug - sanitizersBroken = stdenv.isDarwin || stdenv.cc.isClang && builtins.compareVersions (getVersion stdenv.cc.name) "6.0.0" < 0; + sanitizersBroken = stdenv.cc.isClang && versionOlder (getVersion stdenv.cc.name) "6.0.0"; in stdenv.mkDerivation { name = "cc-wrapper-test"; From ad5540926631578af418e2e307c8d251ba55d753 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 14 Jun 2018 19:28:32 -0400 Subject: [PATCH 12/12] cc-wrapper: fix eval error on mac When doing cross to linux, we will not have a GCC compiler (yet). We can hopefully skip the cxx stdlib stuff for now. --- pkgs/build-support/cc-wrapper/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 7a18993d607..803d8b9fa12 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -42,7 +42,7 @@ let # The wrapper scripts use 'cat' and 'grep', so we may need coreutils. coreutils_bin = if nativeTools then "" else getBin coreutils; - default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools) + default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools && cc ? gcc) "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)"; dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config;