From 19d885016419ecc1c9045db0666f45d3e3f17953 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 3 Jan 2018 08:02:17 -0600 Subject: [PATCH 1/4] llvm-packages: update default 4 -> 5 --- pkgs/top-level/all-packages.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b2a6958fca47..19bb53ac6dc2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6251,7 +6251,7 @@ with pkgs; llvm_35 = llvmPackages_35.llvm; llvm_34 = llvmPackages_34.llvm; - llvmPackages = recurseIntoAttrs llvmPackages_4; + llvmPackages = recurseIntoAttrs llvmPackages_5; llvmPackagesSelf = llvmPackages_34.override { stdenv = libcxxStdenv; @@ -6277,7 +6277,11 @@ with pkgs; inherit (stdenvAdapters) overrideCC; }; - llvmPackages_4 = callPackage ../development/compilers/llvm/4 ({ + llvmPackages_4 = callPackage ../development/compilers/llvm/4 { + inherit (stdenvAdapters) overrideCC; + }; + + llvmPackages_5 = callPackage ../development/compilers/llvm/5 ({ inherit (stdenvAdapters) overrideCC; } // stdenv.lib.optionalAttrs stdenv.isDarwin { cmake = cmake.override { isBootstrap = true; }; @@ -6285,10 +6289,6 @@ with pkgs; python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; }; }); - llvmPackages_5 = callPackage ../development/compilers/llvm/5 { - inherit (stdenvAdapters) overrideCC; - }; - manticore = callPackage ../development/compilers/manticore { }; mentorToolchains = recurseIntoAttrs ( @@ -7944,7 +7944,6 @@ with pkgs; ycmd = callPackage ../development/tools/misc/ycmd { inherit (darwin.apple_sdk.frameworks) Cocoa; - llvmPackages = llvmPackages_5; python = python2; }; @@ -10100,8 +10099,6 @@ with pkgs; # makes it slower, but during runtime we link against just mesa_drivers # through /run/opengl-driver*, which is overriden according to config.grsecurity # grsecEnabled = true; # no more support in nixpkgs ATM - - llvmPackages = llvmPackages_5; }); mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { }); From db7e0aeb426534315888a38c1c13b6dd68ed014f Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 31 Jan 2018 19:13:57 +0100 Subject: [PATCH 2/4] llvm-packages: cleanup --- pkgs/development/compilers/zig/default.nix | 4 ++-- pkgs/development/haskell-modules/configuration-nix.nix | 2 +- pkgs/os-specific/linux/bcc/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +--- pkgs/top-level/python-packages.nix | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/zig/default.nix b/pkgs/development/compilers/zig/default.nix index 6f0c6d19e450..cffc683f9e7b 100644 --- a/pkgs/development/compilers/zig/default.nix +++ b/pkgs/development/compilers/zig/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, llvmPackages_5, llvm_5 }: +{ stdenv, fetchFromGitHub, cmake, llvmPackages }: stdenv.mkDerivation rec { version = "0.1.1"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "01yqjyi25f99bfmxxwyh45k7j84z0zg7n9jl8gg0draf96mzdh06"; }; - buildInputs = [ cmake llvmPackages_5.clang-unwrapped llvm_5 ]; + buildInputs = [ cmake llvmPackages.clang-unwrapped llvmPackages.llvm ]; cmakeFlags = [ "-DZIG_LIBC_INCLUDE_DIR=${stdenv.cc.libc_dev}/include" diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 2320d6a8752a..edec2724d84d 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -258,7 +258,7 @@ self: super: builtins.intersectAttrs super { } ); - llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_5; }; + llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm; }; # Needs help finding LLVM. spaceprobe = addBuildTool super.spaceprobe self.llvmPackages.llvm; diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index 23e8c1ca7d7e..6725cec750a1 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper, cmake, llvmPackages_5, kernel +{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper, cmake, llvmPackages, kernel , flex, bison, elfutils, python, pythonPackages, luajit, netperf, iperf, libelf }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ - llvmPackages_5.llvm llvmPackages_5.clang-unwrapped kernel + llvmPackages.llvm llvmPackages.clang-unwrapped kernel elfutils python pythonPackages.netaddr luajit netperf iperf ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19bb53ac6dc2..633383d8849b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5611,9 +5611,7 @@ with pkgs; ''; }); - crystal = callPackage ../development/compilers/crystal { - llvm = llvm_5; - }; + crystal = callPackage ../development/compilers/crystal { }; devpi-client = callPackage ../development/tools/devpi-client {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ef528812d9ee..5bb3086573d3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9935,7 +9935,7 @@ in { locustio = callPackage ../development/python-modules/locustio { }; - llvmlite = callPackage ../development/python-modules/llvmlite {llvm=pkgs.llvm_5;}; + llvmlite = callPackage ../development/python-modules/llvmlite { llvm = pkgs.llvm; }; lockfile = buildPythonPackage rec { pname = "lockfile"; From 79f43537e6e99d6b9451d9643ae405aab29bb468 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 1 Feb 2018 00:26:49 +0100 Subject: [PATCH 3/4] ICU: fix build with clang-5 --- .../apple-source-releases/ICU/clang-5.patch | 22 +++++++++++++++++++ .../apple-source-releases/ICU/default.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/ICU/clang-5.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/clang-5.patch b/pkgs/os-specific/darwin/apple-source-releases/ICU/clang-5.patch new file mode 100644 index 000000000000..fd9df8129407 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/clang-5.patch @@ -0,0 +1,22 @@ +diff --git a/icuSources/i18n/ucoleitr.cpp b/icuSources/i18n/ucoleitr.cpp +index ecc94c9..936452f 100644 +--- a/icuSources/i18n/ucoleitr.cpp ++++ b/icuSources/i18n/ucoleitr.cpp +@@ -320,7 +320,7 @@ ucol_nextProcessed(UCollationElements *elems, + int32_t *ixHigh, + UErrorCode *status) + { +- return (UCollationPCE::UCollationPCE(elems)).nextProcessed(ixLow, ixHigh, status); ++ return (UCollationPCE(elems)).nextProcessed(ixLow, ixHigh, status); + } + + +@@ -384,7 +384,7 @@ ucol_previousProcessed(UCollationElements *elems, + int32_t *ixHigh, + UErrorCode *status) + { +- return (UCollationPCE::UCollationPCE(elems)).previousProcessed(ixLow, ixHigh, status); ++ return (UCollationPCE(elems)).previousProcessed(ixLow, ixHigh, status); + } + + U_NAMESPACE_BEGIN diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix index 2d098418f030..eef26f4b79a6 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix @@ -3,6 +3,8 @@ appleDerivation { nativeBuildInputs = [ cctools ]; + patches = [ ./clang-5.patch ]; + postPatch = '' substituteInPlace makefile \ --replace /usr/bin/ "" \ From 5af41b7a2265cbc88c3fa128133e91e274e937e0 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 1 Feb 2018 21:21:08 +0100 Subject: [PATCH 4/4] pixman: fix clang5 build --- pkgs/development/libraries/pixman/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index dc378711d36b..6b891bdb38c2 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -1,16 +1,25 @@ -{ fetchurl, stdenv, pkgconfig, libpng, glib /*just passthru*/ }: +{ stdenv, fetchurl, fetchpatch, autoconf, automake, libtool, pkgconfig, libpng, glib /*just passthru*/ }: stdenv.mkDerivation rec { - name = "pixman-0.34.0"; + name = "pixman-${version}"; + version = "0.34.0"; src = fetchurl { url = "mirror://xorg/individual/lib/${name}.tar.bz2"; sha256 = "184lazwdpv67zrlxxswpxrdap85wminh1gmq1i5lcz6iycw39fir"; }; - patches = []; + patches = stdenv.lib.optionals stdenv.cc.isClang [ + (fetchpatch { + name = "builtin-shuffle.patch"; + url = https://patchwork.freedesktop.org/patch/177506/raw; + sha256 = "0rvraq93769dy2im2m022rz99fcdxprgc2fbmasnddcwrqy1x3xr"; + }) + ]; + + nativeBuildInputs = [ pkgconfig ] + ++ stdenv.lib.optionals stdenv.cc.isClang [ autoconf automake libtool ]; - nativeBuildInputs = [ pkgconfig ]; buildInputs = stdenv.lib.optional doCheck libpng; configureFlags = stdenv.lib.optional stdenv.isArm "--disable-arm-iwmmxt";