From b3d99bf063b8ef3ea162edaf766333ab41ffdbee Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 25 Nov 2019 13:16:48 +0100 Subject: [PATCH 01/28] systemd: add flokli to maintainers --- pkgs/os-specific/linux/systemd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 3cc976a909dd..e266b0d48cec 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -263,6 +263,6 @@ in stdenv.mkDerivation { license = licenses.lgpl21Plus; platforms = platforms.linux; priority = 10; - maintainers = with maintainers; [ eelco andir mic92 ]; + maintainers = with maintainers; [ andir eelco flokli mic92 ]; }; } From fef59ca3a814310163b3a38d9c0f380c5d4a0917 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 25 Nov 2019 13:15:37 +0100 Subject: [PATCH 02/28] systemd: v243.3 -> v243.4 --- pkgs/os-specific/linux/systemd/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index e266b0d48cec..ffb1fb59d21a 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -36,10 +36,10 @@ in stdenv.mkDerivation { # When updating, use https://github.com/systemd/systemd-stable tree, not the development one! # Also fresh patches should be cherry-picked from that tree to our current one. src = fetchFromGitHub { - owner = "NixOS"; + owner = "nixos"; repo = "systemd"; - rev = "491a247eff9b7ce1e5877f5f3431517c95f3222f"; - sha256 = "1xqiahapg480m165glrwqbfmc1fxw5sacdlm933cwyi1q8x4537g"; + rev = "d8853d39a28b9884e0acd3ae5732a1e7caaf08af"; + sha256 = "1wqm51i2czbbb3nara11mnxzqng4na1l8fvz7qnbxcrjsqm7hz18"; }; outputs = [ "out" "lib" "man" "dev" ]; From c06a0b2c8cf527b180740ee38e7d2fccad9fd064 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Fri, 11 Oct 2019 22:58:47 +0200 Subject: [PATCH 03/28] zstd: build with CMake CMake is used for static builds because the Makefile does not offer a way to disable the shared library. --- pkgs/tools/compression/zstd/default.nix | 51 ++++++++++--------------- pkgs/top-level/static.nix | 4 ++ 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index a3aecf88c907..82a6a3a8a53c 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -1,7 +1,8 @@ -{ stdenv, fetchFromGitHub, fetchpatch, gnugrep +{ stdenv, fetchFromGitHub, fetchpatch, cmake, gnugrep , fixDarwinDylibNames , file -, legacySupport ? false }: +, legacySupport ? false +, enableShared ? true }: stdenv.mkDerivation rec { pname = "zstd"; @@ -14,56 +15,46 @@ stdenv.mkDerivation rec { owner = "facebook"; }; + nativeBuildInputs = [ cmake ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + patches = [ - # All 3 from https://github.com/facebook/zstd/pull/1883 + # From https://github.com/facebook/zstd/pull/1883 (fetchpatch { url = "https://github.com/facebook/zstd/commit/106278e7e5fafaea3b7deb4147bdc8071562d2f0.diff"; sha256 = "13z7id1qbc05cv1rmak7c8xrchp7jh1i623bq5pwcihg57wzcyr8"; }) - (fetchpatch { - url = "https://github.com/facebook/zstd/commit/0ede342acc2c26f87ae962fa88e158904d4198c4.diff"; - sha256 = "12l5xbvnzkvr76mvl1ls767paqfwbd9q1pzq44ckacfpz4f6iaap"; - excludes = [ - # I think line endings are causing problems, or something like that - "programs/windres/generate_res.bat" - ]; - }) - (fetchpatch { - url = "https://github.com/facebook/zstd/commit/10552eaffef84c011f67af0e04f0780b50a5ab26.diff"; - sha256 = "1s27ravar3rn7q8abybp9733jhpsfcaci51k04da94ahahvxwiqw"; - }) ] # This I didn't upstream because if you use posix threads with MinGW it will # work find, and I'm not sure how to write the condition. ++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; - nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - - makeFlags = [ - "ZSTD_LEGACY_SUPPORT=${if legacySupport then "1" else "0"}" - ] ++ stdenv.lib.optional stdenv.hostPlatform.isWindows "OS=Windows"; + cmakeFlags = [ + "-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}" + "-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}" + "-DZSTD_BUILD_TESTS:BOOL=ON" + ]; + cmakeDir = "../build/cmake"; + dontUseCmakeBuildDir = true; + preConfigure = '' + mkdir -p build_ && cd $_ + ''; checkInputs = [ file ]; doCheck = true; preCheck = '' - substituteInPlace tests/playTests.sh \ + substituteInPlace ../tests/playTests.sh \ --replace 'MD5SUM="md5 -r"' 'MD5SUM="md5sum"' ''; - installFlags = [ - "PREFIX=$(out)" - ]; - - preInstall = '' - substituteInPlace programs/zstdgrep \ + preInstall = stdenv.lib.optionalString enableShared '' + substituteInPlace ../programs/zstdgrep \ --replace ":-grep" ":-${gnugrep}/bin/grep" \ --replace ":-zstdcat" ":-$out/bin/zstdcat" - substituteInPlace programs/zstdless \ + substituteInPlace ../programs/zstdless \ --replace "zstdcat" "$out/bin/zstdcat" ''; - enableParallelBuilding = true; - meta = with stdenv.lib; { description = "Zstandard real-time compression algorithm"; longDescription = '' diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 687086b6ed3b..8723e209e7f9 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -223,6 +223,10 @@ in { staticOnly = true; }; + zstd = super.zstd.override { + enableShared = false; + }; + llvmPackages_8 = super.llvmPackages_8 // { libraries = super.llvmPackages_8.libraries // rec { libcxxabi = super.llvmPackages_8.libraries.libcxxabi.override { From 15fb93ac4f9f56d71efe3ff3891b9b5d62d88fe8 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 10:59:36 +0100 Subject: [PATCH 04/28] double-conversion: add pkgsStatic support --- pkgs/development/libraries/double-conversion/default.nix | 6 +++--- pkgs/top-level/static.nix | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/double-conversion/default.nix b/pkgs/development/libraries/double-conversion/default.nix index bc4bc8b23524..4d8f623b36a4 100644 --- a/pkgs/development/libraries/double-conversion/default.nix +++ b/pkgs/development/libraries/double-conversion/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, cmake }: +{ stdenv, lib, fetchFromGitHub, cmake, static ? false }: stdenv.mkDerivation rec { pname = "double-conversion"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]; # Case sensitivity issue preConfigure = lib.optionalString stdenv.isDarwin '' @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Binary-decimal and decimal-binary routines for IEEE doubles"; - homepage = https://github.com/google/double-conversion; + homepage = "https://github.com/google/double-conversion"; license = licenses.bsd3; platforms = platforms.unix; maintainers = with maintainers; [ abbradar ]; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 8723e209e7f9..17000e8eced2 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -170,6 +170,9 @@ in { # --disable-shared flag stdenv = super.stdenv; }; + double-conversion = super.double-conversion.override { + static = true; + }; gmp = super.gmp.override { withStatic = true; }; From d567c7e49768f001de428573777ad5cd0265092c Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:04:53 +0100 Subject: [PATCH 05/28] glog: add pkgsStatic support --- pkgs/development/libraries/glog/default.nix | 8 +++++--- pkgs/top-level/static.nix | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix index 792217043da7..7809dc088427 100644 --- a/pkgs/development/libraries/glog/default.nix +++ b/pkgs/development/libraries/glog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, perl }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, perl, static ? false }: stdenv.mkDerivation rec { pname = "glog"; @@ -20,13 +20,15 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]; checkInputs = [ perl ]; doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm" meta = with stdenv.lib; { - homepage = https://github.com/google/glog; + homepage = "https://github.com/google/glog"; license = licenses.bsd3; description = "Library for application-level logging"; platforms = platforms.unix; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 17000e8eced2..74c4b838ccc3 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -176,6 +176,9 @@ in { gmp = super.gmp.override { withStatic = true; }; + glog = super.glog.override { + static = true; + }; cdo = super.cdo.override { enable_all_static = true; }; From 93da24ca80f04349b5fc00848ae0a20120607e5c Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:05:48 +0100 Subject: [PATCH 06/28] gflags: add pkgsStatic support --- pkgs/development/libraries/gflags/default.nix | 6 +++--- pkgs/top-level/static.nix | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gflags/default.nix b/pkgs/development/libraries/gflags/default.nix index 2e818ea94ea5..b09936f29240 100644 --- a/pkgs/development/libraries/gflags/default.nix +++ b/pkgs/development/libraries/gflags/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake }: +{ stdenv, fetchFromGitHub, cmake, enableShared ? true}: stdenv.mkDerivation rec { pname = "gflags"; @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { preConfigure = "rm BUILD"; cmakeFlags = [ - "-DBUILD_SHARED_LIBS=ON" - "-DBUILD_STATIC_LIBS=ON" + "-DGFLAGS_BUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}" + "-DGFLAGS_BUILD_STATIC_LIBS=ON" ]; doCheck = false; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 74c4b838ccc3..16484b47e010 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -176,6 +176,9 @@ in { gmp = super.gmp.override { withStatic = true; }; + gflags = super.gflags.override { + enableShared = false; + }; glog = super.glog.override { static = true; }; From 812ccd8e4c2d8b9bfe87e20251435140676b6b6b Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:06:59 +0100 Subject: [PATCH 07/28] gtest: add pkgsStatic support --- pkgs/top-level/static.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 16484b47e010..5aa5a103bde2 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -182,6 +182,9 @@ in { glog = super.glog.override { static = true; }; + gtest = super.gtest.override { + static = true; + }; cdo = super.cdo.override { enable_all_static = true; }; From 0aeacdeaae6fc6f7d0d6af71ef6a5af2661e9fd5 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:12:48 +0100 Subject: [PATCH 08/28] woff2: add pkgsStatic support --- .../development/web/woff2/brotli-static.patch | 36 +++++++++++++++++++ pkgs/development/web/woff2/default.nix | 16 ++++++--- pkgs/top-level/static.nix | 3 ++ 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/web/woff2/brotli-static.patch diff --git a/pkgs/development/web/woff2/brotli-static.patch b/pkgs/development/web/woff2/brotli-static.patch new file mode 100644 index 000000000000..4ed6d7e741a8 --- /dev/null +++ b/pkgs/development/web/woff2/brotli-static.patch @@ -0,0 +1,36 @@ +diff a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake +--- a/cmake/FindBrotliDec.cmake ++++ b/cmake/FindBrotliDec.cmake +@@ -18,10 +18,10 @@ find_path(BROTLIDEC_INCLUDE_DIRS + HINTS ${PC_BROTLIDEC_INCLUDEDIR} + ) + +-find_library(BROTLIDEC_LIBRARIES +- NAMES brotlidec +- HINTS ${PC_BROTLIDEC_LIBDIR} +-) ++if(NOT BUILD_SHARED_LIBS) ++ set(_S "STATIC_") ++endif() ++set(BROTLIDEC_LIBRARIES ${PC_BROTLIDEC_${_S}LIBRARIES}) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(BrotliDec +diff a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake +--- a/cmake/FindBrotliEnc.cmake ++++ b/cmake/FindBrotliEnc.cmake +@@ -18,10 +18,10 @@ find_path(BROTLIENC_INCLUDE_DIRS + HINTS ${PC_BROTLIENC_INCLUDEDIR} + ) + +-find_library(BROTLIENC_LIBRARIES +- NAMES brotlienc +- HINTS ${PC_BROTLIENC_LIBDIR} +-) ++if(NOT BUILD_SHARED_LIBS) ++ set(_S "STATIC_") ++endif() ++set(BROTLIENC_LIBRARIES ${PC_BROTLIENC_${_S}LIBRARIES}) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(BrotliEnc diff --git a/pkgs/development/web/woff2/default.nix b/pkgs/development/web/woff2/default.nix index b77184e56525..ff0484547fc2 100644 --- a/pkgs/development/web/woff2/default.nix +++ b/pkgs/development/web/woff2/default.nix @@ -1,4 +1,4 @@ -{ brotli, cmake, fetchFromGitHub, stdenv }: +{ brotli, cmake, pkgconfig, fetchFromGitHub, stdenv, static ? false }: stdenv.mkDerivation rec { pname = "woff2"; @@ -13,18 +13,24 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "lib" ]; - nativeBuildInputs = [ cmake ]; + # Need to explicitly link to brotlicommon + patches = stdenv.lib.optional static ./brotli-static.patch; + + nativeBuildInputs = [ cmake pkgconfig ]; + + cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ] + ++ stdenv.lib.optional static "-DCMAKE_SKIP_RPATH:BOOL=TRUE"; propagatedBuildInputs = [ brotli ]; - # without this binaries only get built if shared libs are disable - patchPhase = '' + postPatch = '' + # without this binaries only get built if shared libs are disable sed 's@^if (NOT BUILD_SHARED_LIBS)$@if (TRUE)@g' -i CMakeLists.txt ''; meta = with stdenv.lib; { description = "Webfont compression reference code"; - homepage = https://github.com/google/woff2; + homepage = "https://github.com/google/woff2"; license = licenses.mit; maintainers = [ maintainers.hrdinka ]; platforms = platforms.unix; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 5aa5a103bde2..1d3c4af50430 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -203,6 +203,9 @@ in { # it doesn’t like the --disable-shared flag stdenv = super.stdenv; }; + woff2 = super.woff2.override { + static = true; + }; lz4 = super.lz4.override { enableShared = false; enableStatic = true; From a244885c63adf4d0c21702cd6a370dc656b9f353 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:16:38 +0100 Subject: [PATCH 09/28] snappy: add pkgsStatic support --- pkgs/development/libraries/snappy/default.nix | 9 ++++++--- pkgs/top-level/static.nix | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/snappy/default.nix b/pkgs/development/libraries/snappy/default.nix index f35f5bfc55a2..0ad1a4b28987 100644 --- a/pkgs/development/libraries/snappy/default.nix +++ b/pkgs/development/libraries/snappy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake }: +{ stdenv, fetchFromGitHub, cmake, static ? false }: stdenv.mkDerivation rec { pname = "snappy"; @@ -17,7 +17,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" + "-DCMAKE_SKIP_BUILD_RPATH=OFF" + ]; postInstall = '' substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \ @@ -29,7 +32,7 @@ stdenv.mkDerivation rec { doCheck = true; meta = with stdenv.lib; { - homepage = https://google.github.io/snappy/; + homepage = "https://google.github.io/snappy/"; license = licenses.bsd3; description = "Compression/decompression library for very high speeds"; platforms = platforms.all; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 1d3c4af50430..c75e5127534f 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -206,6 +206,9 @@ in { woff2 = super.woff2.override { static = true; }; + snappy = super.snappy.override { + static = true; + }; lz4 = super.lz4.override { enableShared = false; enableStatic = true; From e4da6854a0372dc9b6a92ea1c11a5c5ca133bcda Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Dec 2019 09:08:09 +0100 Subject: [PATCH 10/28] glib: remove Autotools specific env vars Even upstream no longer ships Autotools build files. --- pkgs/development/libraries/glib/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 0febed9f9c96..4a7d6cce90b0 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -138,9 +138,6 @@ stdenv.mkDerivation rec { patchShebangs tests/gen-casemap-txt.py ''; - LIBELF_CFLAGS = optional stdenv.isFreeBSD "-I${libelf}"; - LIBELF_LIBS = optional stdenv.isFreeBSD "-L${libelf} -lelf"; - DETERMINISTIC_BUILD = 1; postInstall = '' From 95a1614a9f8985d8cc2f166fa61d7954754e629b Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Dec 2019 09:16:53 +0100 Subject: [PATCH 11/28] glibc: make NIX_CFLAGS_COMPILE a string --- pkgs/development/libraries/glibc/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 98e579cb7a6d..1a17595a1a32 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -48,21 +48,21 @@ callPackage ./common.nix { inherit stdenv; } { # limit rebuilds by only disabling pie w/musl ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie"; - NIX_CFLAGS_COMPILE = - if !stdenv.hostPlatform.isMusl + NIX_CFLAGS_COMPILE = stdenv.lib.concatStringsSep " " + (if !stdenv.hostPlatform.isMusl # TODO: This (returning a string or `null`, instead of a list) is to # not trigger a mass rebuild due to the introduction of the # musl-specific flags below. # At next change to non-musl glibc builds, remove this `then` # and the above condition, instead keeping only the `else` below. - then (if withGd then gdCflags else null) + then (stdenv.lib.optionals withGd gdCflags) else (builtins.concatLists [ (stdenv.lib.optionals withGd gdCflags) # Fix -Werror build failure when building glibc with musl with GCC >= 8, see: # https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798 (stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias") - ]); + ])); # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for # any program we run, because the gcc will have been placed at a new From d6a5d28a4cf6786042544bb45aa64610bf3a1974 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 22 Dec 2019 18:44:37 -0800 Subject: [PATCH 12/28] bison: 3.4.2 -> 3.5 --- pkgs/development/tools/parsing/bison/3.x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/parsing/bison/3.x.nix b/pkgs/development/tools/parsing/bison/3.x.nix index 5382ec421b7e..0253fa27dc0d 100644 --- a/pkgs/development/tools/parsing/bison/3.x.nix +++ b/pkgs/development/tools/parsing/bison/3.x.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "bison"; - version = "3.4.2"; + version = "3.5"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; - sha256 = "1kzsb6fmmpq00l2s55hyb4dbsmz8f3a64ria6354wlbx6ypj4fgz"; + sha256 = "1l8k2fcklwy0y57yidxvk5lbf0kb96ci3zffg2djivk8k05j0dhb"; }; nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man; From 25fb1a02a35bf024c9d909b7629d1ca653f6cfe0 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sun, 22 Dec 2019 14:05:05 +1000 Subject: [PATCH 13/28] file: 5.37 -> 5.38 --- pkgs/tools/misc/file/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 9dd3970bbb22..24a7143d8e11 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -1,25 +1,17 @@ -{ stdenv, fetchurl, fetchpatch, file, zlib, libgnurx }: +{ stdenv, fetchurl, file, zlib, libgnurx }: stdenv.mkDerivation rec { pname = "file"; - version = "5.37"; + version = "5.38"; src = fetchurl { urls = [ "ftp://ftp.astron.com/pub/file/${pname}-${version}.tar.gz" "https://distfiles.macports.org/file/${pname}-${version}.tar.gz" ]; - sha256 = "0zz0p9bqnswfx0c16j8k62ivjq1m16x10xqv4hy9lcyxyxkkkhg9"; + sha256 = "0d7s376b4xqymnrsjxi3nsv3f5v89pzfspzml2pcajdk5by2yg2r"; }; - patches = [ - (fetchpatch { - name = "CVE-2019-18218.patch"; - url = "https://sources.debian.org/data/main/f/file/1:5.37-6/debian/patches/cherry-pick.FILE5_37-67-g46a8443f.limit-the-number-of-elements-in-a-vector-found-by-oss-fuzz.patch"; - sha256 = "1i22y91yndc3n2p2ngczp1lwil8l05sp8ciicil74xrc5f91y6mj"; - }) - ]; - nativeBuildInputs = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file; buildInputs = [ zlib ] ++ stdenv.lib.optional stdenv.hostPlatform.isWindows libgnurx; From 3e50d4a6f3e50dfe57001f200050102830f24d22 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Mon, 16 Dec 2019 11:55:04 -0600 Subject: [PATCH 14/28] vim: 8.1.2407 -> 8.2.0013 --- pkgs/applications/editors/vim/common.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix index ceecfa73ce4c..485f1d0dca3d 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -1,12 +1,12 @@ { lib, fetchFromGitHub }: rec { - version = "8.1.2407"; + version = "8.2.0013"; src = fetchFromGitHub { owner = "vim"; repo = "vim"; rev = "v${version}"; - sha256 = "1h23lncm8py0ip8p61y8hivmnd8fzf8xpwpkd73d3a3fpiyd2yx8"; + sha256 = "00sc9zdjdww6f3svwf0nxpx8q2zp1n1r978h7ijapgvn2ysx2z1f"; }; enableParallelBuilding = true; @@ -24,7 +24,7 @@ rec { description = "The most popular clone of the VI editor"; homepage = http://www.vim.org; license = licenses.vim; - maintainers = with maintainers; [ lovek323 ]; + maintainers = with maintainers; [ lovek323 equirosa ]; platforms = platforms.unix; }; } From c93355bb4ab67113478c680e535d3a37b4f263ad Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 28 Nov 2019 03:24:20 -0800 Subject: [PATCH 15/28] man: 2.8.7 -> 2.9.0 --- pkgs/tools/misc/man-db/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 49e4ab44836e..918e8372dcbb 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, libpipeline, db, groff, libiconv, makeWrapper, buildPackages }: stdenv.mkDerivation rec { - name = "man-db-2.8.7"; + name = "man-db-2.9.0"; src = fetchurl { url = "mirror://savannah/man-db/${name}.tar.xz"; - sha256 = "09mkpvwirv9kh2pqhfq90zl7pjdl63f4w4g1x6zhhp9hjswmpkdr"; + sha256 = "0qg2sdn8mayya0ril484iz1r7hi46l68d2d80cr6lvc7x3csqjjx"; }; outputs = [ "out" "doc" ]; From 302a77a02cc75709bafa39953bfa84e03aa52e26 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 29 Dec 2019 20:41:00 +0000 Subject: [PATCH 16/28] cyrus_sasl: add patch for CVE-2019-19906 sourced from debian as patch isn't even in upstream master yet. --- pkgs/development/libraries/cyrus-sasl/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index a050dd8d9cac..68f6a7c5d8b8 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, openssl, openldap, kerberos, db, gettext , pam, fixDarwinDylibNames, autoreconfHook, enableLdap ? false -, buildPackages, pruneLibtoolFiles }: +, buildPackages, pruneLibtoolFiles, fetchpatch }: with stdenv.lib; stdenv.mkDerivation rec { @@ -27,6 +27,11 @@ stdenv.mkDerivation rec { patches = [ ./missing-size_t.patch # https://bugzilla.redhat.com/show_bug.cgi?id=906519 ./cyrus-sasl-ac-try-run-fix.patch + (fetchpatch { + name = "CVE-2019-19906.patch"; + url = "https://sources.debian.org/data/main/c/cyrus-sasl2/2.1.27+dfsg-1+deb10u1/debian/patches/0021-CVE-2019-19906.patch"; + sha256 = "1n4c5wg7l9j8rlbvx8i605j5d39xmj5wm618k8acxl4fmglcmfls"; + }) ]; configureFlags = [ From 0a21b322346977d7413c8cd2a3d834d8f1b03c96 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:39:21 +0100 Subject: [PATCH 17/28] thrift: build with CMake; add pkgsStatic support --- pkgs/development/libraries/thrift/default.nix | 36 +++++++++++-------- pkgs/top-level/static.nix | 12 ++++--- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix index ecdb831fcfaf..b1b66ed052fb 100644 --- a/pkgs/development/libraries/thrift/default.nix +++ b/pkgs/development/libraries/thrift/default.nix @@ -1,6 +1,5 @@ -{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, pkgconfig, bison -, flex, twisted -}: +{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, cmake, pkgconfig +, bison, flex, twisted, static ? false }: stdenv.mkDerivation rec { pname = "thrift"; @@ -11,27 +10,36 @@ stdenv.mkDerivation rec { sha256 = "0yai9c3bdsrkkjshgim7zk0i7malwfprg00l9774dbrkh2w4ilvs"; }; - #enableParallelBuilding = true; problems on hydra - # Workaround to make the python wrapper not drop this package: # pythonFull.buildEnv.override { extraLibs = [ thrift ]; } pythonPath = []; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - boost zlib libevent openssl python bison flex twisted - ]; + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ boost zlib libevent openssl python bison flex ] + ++ stdenv.lib.optional (!static) twisted; preConfigure = "export PY_PREFIX=$out"; - # TODO: package boost-test, so we can run the test suite. (Currently it fails - # to find libboost_unit_test_framework.a.) - configureFlags = [ "--enable-tests=no" ]; - doCheck = false; + cmakeFlags = [ + # FIXME: Fails to link in static mode with undefined reference to + # `boost::unit_test::unit_test_main(bool (*)(), int, char**)' + "-DBUILD_TESTING:BOOL=${if static then "OFF" else "ON"}" + ] ++ stdenv.lib.optionals static [ + "-DWITH_STATIC_LIB:BOOL=ON" + "-DOPENSSL_USE_STATIC_LIBS=ON" + ]; + + doCheck = !static; + checkPhase = '' + runHook preCheck + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib ctest -E PythonTestSSLSocket + runHook postCheck + ''; + enableParallelChecking = false; meta = with stdenv.lib; { description = "Library for scalable cross-language services"; - homepage = http://thrift.apache.org/; + homepage = "http://thrift.apache.org/"; license = licenses.asl20; platforms = platforms.linux ++ platforms.darwin; maintainers = [ maintainers.bjornfor ]; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index c75e5127534f..81c977b79814 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -55,7 +55,7 @@ self: super: let removeUnknownConfigureFlags = f: with self.lib; remove "--disable-shared" (remove "--enable-static" f); - + ocamlFixPackage = b: b.overrideAttrs (o: { configurePlatforms = [ ]; @@ -63,7 +63,7 @@ self: super: let buildInputs = o.buildInputs ++ o.nativeBuildInputs or [ ]; propagatedNativeBuildInputs = o.propagatedBuildInputs or [ ]; }); - + ocamlStaticAdapter = _: super: self.lib.mapAttrs (_: p: if p ? overrideAttrs then ocamlFixPackage p else p) @@ -170,6 +170,10 @@ in { # --disable-shared flag stdenv = super.stdenv; }; + thrift = super.thrift.override { + static = true; + twisted = null; + }; double-conversion = super.double-conversion.override { static = true; }; @@ -227,7 +231,7 @@ in { kmod = super.kmod.override { withStatic = true; }; - + curl = super.curl.override { # a very sad story: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439039 gssSupport = false; @@ -263,6 +267,6 @@ in { ocaml-ng = self.lib.mapAttrs (_: set: if set ? overrideScope' then set.overrideScope' ocamlStaticAdapter else set ) super.ocaml-ng; - + python27 = super.python27.override { static = true; }; } From 207db019cefd27b20e16609384ce1aedf998c991 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:22:20 +0100 Subject: [PATCH 18/28] arrow-cpp: add pkgsStatic support --- pkgs/development/libraries/arrow-cpp/default.nix | 13 +++++++++++-- .../arrow-cpp/jemalloc-disable-shared.patch | 11 +++++++++++ pkgs/top-level/static.nix | 4 ++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix index f6f3493002ad..587311a8cc3b 100644 --- a/pkgs/development/libraries/arrow-cpp/default.nix +++ b/pkgs/development/libraries/arrow-cpp/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost , brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl -, python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd }: +, python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd +, enableShared ? true }: let parquet-testing = fetchFromGitHub { @@ -34,6 +35,9 @@ in stdenv.mkDerivation rec { patches = [ # patch to fix python-test ./darwin.patch + ] ++ stdenv.lib.optionals (!enableShared) [ + # The shared jemalloc lib is unused and breaks in static mode due to missing -fpic. + ./jemalloc-disable-shared.patch ]; nativeBuildInputs = [ @@ -71,8 +75,13 @@ in stdenv.mkDerivation rec { "-DARROW_DEPENDENCY_SOURCE=SYSTEM" "-DARROW_PARQUET=ON" "-DARROW_PLASMA=ON" - "-DARROW_PYTHON=ON" + # Disable Python for static mode because openblas is currently broken there. + "-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}" "-Duriparser_SOURCE=SYSTEM" + ] ++ stdenv.lib.optionals (!enableShared) [ + "-DARROW_BUILD_SHARED=OFF" + "-DARROW_TEST_LINKAGE=static" + "-DOPENSSL_USE_STATIC_LIBS=ON" ] ++ stdenv.lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF"; doInstallCheck = true; diff --git a/pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch b/pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch new file mode 100644 index 000000000000..0f7955724e16 --- /dev/null +++ b/pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch @@ -0,0 +1,11 @@ +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -1428,6 +1428,7 @@ if(ARROW_JEMALLOC) + "--with-jemalloc-prefix=je_arrow_" + "--with-private-namespace=je_arrow_private_" + "--without-export" ++ "--disable-shared" + # Don't override operator new() + "--disable-cxx" "--disable-libdl" + # See https://github.com/jemalloc/jemalloc/issues/1237 diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 81c977b79814..fbffd8e08f5e 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -162,6 +162,10 @@ in { # --disable-shared flag stdenv = super.stdenv; }; + arrow-cpp = super.arrow-cpp.override { + enableShared = false; + python = { pkgs = { python = null; numpy = null; }; }; + }; boost = super.boost.override { enableStatic = true; enableShared = false; From cdbf3f78bfd1f88259116f6f7cbcc6c5df0a9687 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sat, 20 Jul 2019 21:24:12 +0200 Subject: [PATCH 19/28] arrow-cpp: add lib parameter --- .../libraries/arrow-cpp/default.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix index 587311a8cc3b..87684a4bbe4a 100644 --- a/pkgs/development/libraries/arrow-cpp/default.nix +++ b/pkgs/development/libraries/arrow-cpp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost +{ stdenv, lib, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost , brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl , python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd , enableShared ? true }: @@ -35,7 +35,7 @@ in stdenv.mkDerivation rec { patches = [ # patch to fix python-test ./darwin.patch - ] ++ stdenv.lib.optionals (!enableShared) [ + ] ++ lib.optionals (!enableShared) [ # The shared jemalloc lib is unused and breaks in static mode due to missing -fpic. ./jemalloc-disable-shared.patch ]; @@ -44,7 +44,7 @@ in stdenv.mkDerivation rec { cmake autoconf # for vendored jemalloc flatbuffers - ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; buildInputs = [ boost brotli @@ -78,23 +78,23 @@ in stdenv.mkDerivation rec { # Disable Python for static mode because openblas is currently broken there. "-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}" "-Duriparser_SOURCE=SYSTEM" - ] ++ stdenv.lib.optionals (!enableShared) [ + ] ++ lib.optionals (!enableShared) [ "-DARROW_BUILD_SHARED=OFF" "-DARROW_TEST_LINKAGE=static" "-DOPENSSL_USE_STATIC_LIBS=ON" - ] ++ stdenv.lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF"; + ] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF"; doInstallCheck = true; PARQUET_TEST_DATA = if doInstallCheck then "${parquet-testing}/data" else null; installCheckInputs = [ perl which ]; - installCheckPhase = (stdenv.lib.optionalString stdenv.isDarwin '' + installCheckPhase = (lib.optionalString stdenv.isDarwin '' for f in release/*test{,s}; do install_name_tool -add_rpath "$out"/lib "$f" done '') + (let - excludedTests = stdenv.lib.optionals stdenv.isDarwin [ + excludedTests = lib.optionals stdenv.isDarwin [ # Some plasma tests need to be patched to use a shorter AF_UNIX socket # path on Darwin. See https://github.com/NixOS/nix/pull/1085 "plasma-external-store-tests" @@ -108,8 +108,8 @@ in stdenv.mkDerivation rec { meta = { description = "A cross-language development platform for in-memory data"; homepage = "https://arrow.apache.org/"; - license = stdenv.lib.licenses.asl20; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ tobim veprbl ]; + license = lib.licenses.asl20; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ tobim veprbl ]; }; } From db5d3cdfe20035a92106bb498c50e35274b1d1aa Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Thu, 19 Dec 2019 13:14:07 +0100 Subject: [PATCH 20/28] openblas: partially fix static build --- pkgs/development/libraries/science/math/openblas/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index f8d392691ab2..bf9912f36e83 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -115,6 +115,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl which + ]; + + depsBuildBuild = [ buildPackages.gfortran buildPackages.stdenv.cc ]; From 21b01623833bab4bec735b330a6d07e4dfe1e67e Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 31 Dec 2019 14:53:24 -0600 Subject: [PATCH 21/28] llvmPackages_9: 9.0.0 -> 9.0.1 Fetch from github release page, as that's where https://releases.llvm.org/9.0.1 redirects. --- pkgs/development/compilers/llvm/9/clang/default.nix | 2 +- pkgs/development/compilers/llvm/9/compiler-rt.nix | 2 +- pkgs/development/compilers/llvm/9/default.nix | 6 +++--- pkgs/development/compilers/llvm/9/libc++/default.nix | 2 +- pkgs/development/compilers/llvm/9/libc++abi.nix | 2 +- pkgs/development/compilers/llvm/9/libunwind.nix | 2 +- pkgs/development/compilers/llvm/9/lld.nix | 2 +- pkgs/development/compilers/llvm/9/lldb.nix | 2 +- pkgs/development/compilers/llvm/9/llvm.nix | 4 ++-- pkgs/development/compilers/llvm/9/openmp.nix | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index bf9b1a32a834..1cbeb76bb966 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -9,7 +9,7 @@ let pname = "clang"; inherit version; - src = fetch "cfe" "0426ma80i41qsgzm1qdz81mjskck426diygxi2k5vji2gkpixa3v"; + src = fetch "clang" "0ls2h3iv4finqyflyhry21qhc9cm9ga7g1zq21020p065qmm2y2p"; unpackPhase = '' unpackFile $src diff --git a/pkgs/development/compilers/llvm/9/compiler-rt.nix b/pkgs/development/compilers/llvm/9/compiler-rt.nix index 5826f0fbb35e..75d0614b5142 100644 --- a/pkgs/development/compilers/llvm/9/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/9/compiler-rt.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version; - src = fetch pname "03ni43lbkp63lr3p6sc94dphqmvnz5av5mml0xmk930xvnbcvr2n"; + src = fetch pname "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2"; nativeBuildInputs = [ cmake python llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; diff --git a/pkgs/development/compilers/llvm/9/default.nix b/pkgs/development/compilers/llvm/9/default.nix index 1590d180c3fd..c9e8ce91f0ce 100644 --- a/pkgs/development/compilers/llvm/9/default.nix +++ b/pkgs/development/compilers/llvm/9/default.nix @@ -5,15 +5,15 @@ }: let - release_version = "9.0.0"; + release_version = "9.0.1"; version = release_version; # differentiating these is important for rc's fetch = name: sha256: fetchurl { - url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz"; + url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz"; inherit sha256; }; - clang-tools-extra_src = fetch "clang-tools-extra" "045cldmcfd8s33wyjlviifgpnw52yqicd6v4ysvdg4i96p78c77a"; + clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj"; tools = stdenv.lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); diff --git a/pkgs/development/compilers/llvm/9/libc++/default.nix b/pkgs/development/compilers/llvm/9/libc++/default.nix index daf8ed5a9ae5..1166c7bd76c9 100644 --- a/pkgs/development/compilers/llvm/9/libc++/default.nix +++ b/pkgs/development/compilers/llvm/9/libc++/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "libc++"; inherit version; - src = fetch "libcxx" "136j3v7il9aq8wyp48klx6sifnl5asj4lf5c8yx08cjx5fbn4h9w"; + src = fetch "libcxx" "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/9/libc++abi.nix b/pkgs/development/compilers/llvm/9/libc++abi.nix index 7afff991e75d..fbc9a3731ef8 100644 --- a/pkgs/development/compilers/llvm/9/libc++abi.nix +++ b/pkgs/development/compilers/llvm/9/libc++abi.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "libc++abi"; inherit version; - src = fetch "libcxxabi" "1s9haplqv8ashlsdx2psxiqxh50gqk2jp2vz5yn0djb56mw42l37"; + src = fetch "libcxxabi" "1b4aiaa8cirx52vk2p5kfk57qmbqf1ipb4nqnjhdgqps9jm7iyg8"; nativeBuildInputs = [ cmake ]; buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; diff --git a/pkgs/development/compilers/llvm/9/libunwind.nix b/pkgs/development/compilers/llvm/9/libunwind.nix index 5eba9e03c782..883c36baf062 100644 --- a/pkgs/development/compilers/llvm/9/libunwind.nix +++ b/pkgs/development/compilers/llvm/9/libunwind.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "libunwind"; inherit version; - src = fetch pname "1chd1nz4bscrs6qa7p8sqgk5df86ll0frv0f451vhks2w44qsslp"; + src = fetch pname "1wb02ha3gl6p0a321hwpll74pz5qvjr11xmjqx62g288f1m10njk"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/compilers/llvm/9/lld.nix b/pkgs/development/compilers/llvm/9/lld.nix index c5baef4357ec..775dc2e19056 100644 --- a/pkgs/development/compilers/llvm/9/lld.nix +++ b/pkgs/development/compilers/llvm/9/lld.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "lld"; inherit version; - src = fetch pname "14cgd34gr826qpxzhrkbz6qgm8ymds0hrsiznwzp42ax4f5p9iii"; + src = fetch pname "10hckfxpapfnh6y9apjiya2jpw9nmbbmh8ayijx89mrg7snjn9l6"; nativeBuildInputs = [ cmake ]; buildInputs = [ llvm libxml2 ]; diff --git a/pkgs/development/compilers/llvm/9/lldb.nix b/pkgs/development/compilers/llvm/9/lldb.nix index ee281384c403..64f111502cc5 100644 --- a/pkgs/development/compilers/llvm/9/lldb.nix +++ b/pkgs/development/compilers/llvm/9/lldb.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { pname = "lldb"; inherit version; - src = fetch pname "1507dl0xw03nppxpz2xsq4s30jdbkplx4w14za54ngqm3xm2yk0y"; + src = fetch pname "02gb3fbz09kyw8n71218v5v77ip559x3gqbcp8y3w6n3jpbryywa"; patches = [ ./lldb-procfs.patch ]; diff --git a/pkgs/development/compilers/llvm/9/llvm.nix b/pkgs/development/compilers/llvm/9/llvm.nix index c8f78f5f7f21..4017508a4a6f 100644 --- a/pkgs/development/compilers/llvm/9/llvm.nix +++ b/pkgs/development/compilers/llvm/9/llvm.nix @@ -31,8 +31,8 @@ in stdenv.mkDerivation (rec { pname = "llvm"; inherit version; - src = fetch pname "117ymdz1by2nkfq1c2p9m4050dp848kbjbiv6nsfj8hzy9f5d86n"; - polly_src = fetch "polly" "0cyl2gsibf1dhqvkyw1qb0f8q58ib6cihzyh4f9kj9g77ll95ym4"; + src = fetch pname "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880"; + polly_src = fetch "polly" "1kqg0isv0kicnylrdp5iajlgd6alc0zx1l3cxc9hs8r3z6fwcjls"; unpackPhase = '' unpackFile $src diff --git a/pkgs/development/compilers/llvm/9/openmp.nix b/pkgs/development/compilers/llvm/9/openmp.nix index a511aed2eb8c..4e0a5535ae35 100644 --- a/pkgs/development/compilers/llvm/9/openmp.nix +++ b/pkgs/development/compilers/llvm/9/openmp.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "openmp"; inherit version; - src = fetch pname "0nrv9np134b7c483jnq786spy3hbpj11d7g21g67cqq66c8ynycr"; + src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ llvm ]; From dc0c28a7624f2897765c40a5a4dd46bd7b4eaf8c Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 31 Dec 2019 16:24:31 -0600 Subject: [PATCH 22/28] clang_9: fix unpackPhase --- pkgs/development/compilers/llvm/9/clang/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index 1cbeb76bb966..12fa33a7f8c4 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -13,7 +13,7 @@ let unpackPhase = '' unpackFile $src - mv cfe-${version}* clang + mv clang-${version}* clang sourceRoot=$PWD/clang unpackFile ${clang-tools-extra_src} mv clang-tools-extra-* $sourceRoot/tools/extra From 016111e839ec15e23c080da8ff955a548155202c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 2 Jan 2020 17:05:23 +0100 Subject: [PATCH 23/28] apr: fix static musl build --- pkgs/development/libraries/apr/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index d9409636bd0d..2ce4b77927f1 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -23,10 +23,18 @@ stdenv.mkDerivation rec { configureFlagsArray+=("--with-installbuilddir=$dev/share/build") ''; - configureFlags = + configureFlags = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + "ac_cv_file__dev_zero=yes" + "ac_cv_func_setpgrp_void=0" + "apr_cv_process_shared_works=1" + "apr_cv_tcp_nodelay_with_cork=1" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.system == "i686-cygwin") [ # Including the Windows headers breaks unistd.h. # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 - stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no"; + "ac_cv_header_windows_h=no" + ]; + + CPPFLAGS=stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-DAPR_IOVEC_DEFINED"; enableParallelBuilding = true; From 867552957fc35828de8ce9fb3558e02adcdd8072 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 2 Jan 2020 18:53:00 +0100 Subject: [PATCH 24/28] openblas: fix static musl build --- pkgs/development/libraries/science/math/openblas/default.nix | 4 +++- pkgs/top-level/static.nix | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index bf9912f36e83..a26cf38a9d09 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -8,6 +8,7 @@ # See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt , target ? null , enableStatic ? false +, enableShared ? true }: with stdenv.lib; @@ -60,7 +61,7 @@ let TARGET = setTarget "ATHLON"; DYNAMIC_ARCH = true; NO_AVX512 = true; - USE_OPENMP = true; + USE_OPENMP = !stdenv.hostPlatform.isMusl; }; }; in @@ -129,6 +130,7 @@ stdenv.mkDerivation rec { NUM_THREADS = 64; INTERFACE64 = blas64; NO_STATIC = !enableStatic; + NO_SHARED = !enableShared; CROSS = stdenv.hostPlatform != stdenv.buildPlatform; HOSTCC = "cc"; # Makefile.system only checks defined status diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index fbffd8e08f5e..e52818379fa4 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -152,7 +152,10 @@ in { optipng = super.optipng.override { static = true; }; - openblas = super.openblas.override { enableStatic = true; }; + openblas = super.openblas.override { + enableStatic = true; + enableShared = false; + }; nix = super.nix.override { withAWS = false; }; # openssl 1.1 doesn't compile openssl = super.openssl_1_0_2.override { From 64015f4f7d39f963d4297e0a288798bc28a29018 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 3 Jan 2020 11:09:27 +0100 Subject: [PATCH 25/28] python: numpy: 1.17.4 -> 1.17.5 --- pkgs/development/python-modules/numpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 61f85773949b..21d4ff7937f6 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -16,12 +16,12 @@ let }; in buildPythonPackage rec { pname = "numpy"; - version = "1.17.4"; + version = "1.17.5"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316"; + sha256 = "16507ba6617f62ae3c6ab1725ae6f550331025d4d9a369b83f6d5a470446c342"; }; nativeBuildInputs = [ gfortran pytest ]; From 6ee60b37fcc58df8aff6c669c73e328a90c0b2f1 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 3 Jan 2020 11:10:09 +0100 Subject: [PATCH 26/28] python: numpy: 1.17.5 -> 1.18.0 --- pkgs/development/python-modules/numpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 21d4ff7937f6..d9ff919fe8fc 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -16,12 +16,12 @@ let }; in buildPythonPackage rec { pname = "numpy"; - version = "1.17.5"; + version = "1.18.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "16507ba6617f62ae3c6ab1725ae6f550331025d4d9a369b83f6d5a470446c342"; + sha256 = "a9d72d9abaf65628f0f31bbb573b7d9304e43b1e6bbae43149c17737a42764c4"; }; nativeBuildInputs = [ gfortran pytest ]; From 157ca8eb752674dc9e15e50921462386b545ce19 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 3 Jan 2020 11:41:52 +0100 Subject: [PATCH 27/28] fmt: fix static musl build --- pkgs/top-level/static.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index e52818379fa4..ffb2d294437d 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -143,6 +143,9 @@ in { static = true; shared = false; }; + fmt = super.fmt.override { + enableShared = false; + }; gifsicle = super.gifsicle.override { static = true; }; From fb0da935095f6e7a194d1ec05c7355e8d47fed0c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 3 Jan 2020 12:52:42 +0100 Subject: [PATCH 28/28] python3Packages.numpy: fix build --- .../development/python-modules/numpy/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index d9ff919fe8fc..bdd766968851 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -1,4 +1,15 @@ -{ lib, fetchPypi, python, buildPythonPackage, gfortran, pytest, blas, writeTextFile, isPyPy }: +{ lib +, fetchPypi +, python +, buildPythonPackage +, gfortran +, pytest +, blas +, writeTextFile +, isPyPy +, cython +, setuptoolsBuildHook + }: let blasImplementation = lib.nameFromURL blas.name "-"; @@ -17,6 +28,7 @@ let in buildPythonPackage rec { pname = "numpy"; version = "1.18.0"; + format = "pyproject.toml"; src = fetchPypi { inherit pname version; @@ -24,7 +36,7 @@ in buildPythonPackage rec { sha256 = "a9d72d9abaf65628f0f31bbb573b7d9304e43b1e6bbae43149c17737a42764c4"; }; - nativeBuildInputs = [ gfortran pytest ]; + nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ]; buildInputs = [ blas ]; patches = lib.optionals python.hasDistutilsCxxPatch [