about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/aws-c-common/default.nix28
-rw-r--r--pkgs/development/libraries/aws-c-event-stream/default.nix29
-rw-r--r--pkgs/development/libraries/aws-checksums/default.nix23
-rw-r--r--pkgs/development/libraries/aws-sdk-cpp/default.nix48
-rw-r--r--pkgs/development/libraries/boehm-gc/default.nix7
-rw-r--r--pkgs/development/libraries/cairo/default.nix6
-rw-r--r--pkgs/development/libraries/glibc/common.nix3
-rw-r--r--pkgs/development/libraries/glibc/darwin-cross-build.patch103
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix4
-rw-r--r--pkgs/development/libraries/libtensorflow/default.nix4
-rw-r--r--pkgs/development/libraries/opensubdiv/default.nix4
-rw-r--r--pkgs/development/libraries/physics/rivet/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/5.11/default.nix8
-rw-r--r--pkgs/development/libraries/qt-5/5.11/qtwebengine-no-build-skip.patch12
-rw-r--r--pkgs/development/libraries/qt-5/5.12/default.nix5
-rw-r--r--pkgs/development/libraries/qt-5/5.12/qtwebengine-no-build-skip.patch12
-rw-r--r--pkgs/development/libraries/qt-5/5.6/default.nix5
-rw-r--r--pkgs/development/libraries/qt-5/5.9/default.nix5
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebengine-no-build-skip.patch12
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtconnectivity.nix4
-rw-r--r--pkgs/development/libraries/tpm2-tss/default.nix47
-rw-r--r--pkgs/development/libraries/xgboost/default.nix4
22 files changed, 325 insertions, 54 deletions
diff --git a/pkgs/development/libraries/aws-c-common/default.nix b/pkgs/development/libraries/aws-c-common/default.nix
new file mode 100644
index 000000000000..dd200304ab64
--- /dev/null
+++ b/pkgs/development/libraries/aws-c-common/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-common";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "169ha105qgcvj93hf1bhlya2nlwh8g5fvypd6whfjs9k0hqddi0c";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
+    "-Wno-nullability-extension"
+    "-Wno-typedef-redefinition"
+  ];
+
+  meta = with lib; {
+    description = "AWS SDK for C common core";
+    homepage = https://github.com/awslabs/aws-c-common;
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej eelco ];
+  };
+}
diff --git a/pkgs/development/libraries/aws-c-event-stream/default.nix b/pkgs/development/libraries/aws-c-event-stream/default.nix
new file mode 100644
index 000000000000..47363e12a68d
--- /dev/null
+++ b/pkgs/development/libraries/aws-c-event-stream/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, aws-c-common, aws-checksums }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-event-stream";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0anjynfghk3inysy21wqvhxha33xsswh3lm8pr7nx7cpj6cmr37m";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ aws-c-common aws-checksums ];
+
+  cmakeFlags = [
+    "-DCMAKE_MODULE_PATH=${aws-c-common}/lib/cmake"
+  ];
+
+  meta = with lib; {
+    description = "C99 implementation of the vnd.amazon.eventstream content-type";
+    homepage = https://github.com/awslabs/aws-c-event-stream;
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej eelco ];
+  };
+}
diff --git a/pkgs/development/libraries/aws-checksums/default.nix b/pkgs/development/libraries/aws-checksums/default.nix
new file mode 100644
index 000000000000..0e47398b346d
--- /dev/null
+++ b/pkgs/development/libraries/aws-checksums/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-checksums";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1r21sfs1ik6cb8bz17w6gp6y2xa9rbjxjka0p6airb3qds094iv5";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "HW accelerated CRC32c and CRC32";
+    homepage = https://github.com/awslabs/aws-checksums;
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej eelco ];
+  };
+}
diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix
index a5517a2522dc..9ba611b0f96f 100644
--- a/pkgs/development/libraries/aws-sdk-cpp/default.nix
+++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, fetchFromGitHub, cmake, curl, openssl, zlib
+, aws-c-common, aws-c-event-stream, aws-checksums
 , CoreAudio, AudioToolbox
 , # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
   apis ? ["*"]
@@ -6,22 +7,15 @@
   customMemoryManagement ? true
 }:
 
-let
-  loaderVar =
-    if stdenv.isLinux
-      then "LD_LIBRARY_PATH"
-      else if stdenv.isDarwin
-        then "DYLD_LIBRARY_PATH"
-        else throw "Unsupported system!";
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   name = "aws-sdk-cpp-${version}";
-  version = "1.6.52";
+  version = "1.7.53";
 
   src = fetchFromGitHub {
     owner = "awslabs";
     repo = "aws-sdk-cpp";
     rev = version;
-    sha256 = "17hyq6rv1xl3f70p2pfkkxm86gbfimq2pwpakv1wv3xjibmppbrf";
+    sha256 = "0ybccffz5nrhp4n4nyb6ykrk9fdi0vqqqhjkaxx3l0xvmqx9rbrv";
   };
 
   # FIXME: might be nice to put different APIs in different outputs
@@ -30,43 +24,35 @@ in stdenv.mkDerivation rec {
   separateDebugInfo = stdenv.isLinux;
 
   nativeBuildInputs = [ cmake curl ];
-  buildInputs = [ zlib curl openssl ]
-    ++ lib.optionals (stdenv.isDarwin &&
+
+  buildInputs = [
+    curl openssl zlib
+    aws-c-common aws-c-event-stream aws-checksums
+  ] ++ lib.optionals (stdenv.isDarwin &&
                         ((builtins.elem "text-to-speech" apis) ||
                          (builtins.elem "*" apis)))
          [ CoreAudio AudioToolbox ];
 
-  cmakeFlags =
-       lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
+  cmakeFlags = [
+    "-DBUILD_DEPS=OFF"
+    "-DCMAKE_SKIP_BUILD_RPATH=OFF"
+  ] ++ lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
     ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DENABLE_TESTING=OFF"
     ++ lib.optional (apis != ["*"])
       "-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
 
-  enableParallelBuilding = true;
-
-  # Behold the escaping nightmare below on loaderVar o.O
-  preBuild =
-    ''
-      # Ensure that the unit tests can find the *.so files.
-      for i in testing-resources aws-cpp-sdk-*; do
-        export ${loaderVar}=$(pwd)/$i:''${${loaderVar}}
-      done
-    '';
-
   preConfigure =
     ''
       rm aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp
     '';
 
-  NIX_CFLAGS_COMPILE = [ "-Wno-error=noexcept-type" ];
-
   __darwinAllowLocalNetworking = true;
 
-  meta = {
+  meta = with lib; {
     description = "A C++ interface for Amazon Web Services";
     homepage = https://github.com/awslabs/aws-sdk-cpp;
-    license = lib.licenses.asl20;
-    platforms = lib.platforms.linux ++ lib.platforms.darwin;
-    maintainers = [ lib.maintainers.eelco ];
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ eelco orivej ];
   };
 }
diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix
index d6f7b46079f6..1a2c75ecf912 100644
--- a/pkgs/development/libraries/boehm-gc/default.nix
+++ b/pkgs/development/libraries/boehm-gc/default.nix
@@ -31,7 +31,12 @@ stdenv.mkDerivation rec {
   configureFlags =
     [ "--enable-cplusplus" ]
     ++ lib.optional enableLargeConfig "--enable-large-config"
-    ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static";
+    ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static"
+    # Configure script can't detect whether C11 atomic intrinsics are available
+    # when cross-compiling, so it links to libatomic_ops, which has to be
+    # propagated to all dependencies. To avoid this, assume that the intrinsics
+    # are available.
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--with-libatomic-ops=none";
 
   doCheck = true; # not cross;
 
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index f161e0f511a9..845b09053ad4 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -1,8 +1,10 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv
+{ config, stdenv, fetchurl, fetchpatch, pkgconfig, libiconv
 , libintl, expat, zlib, libpng, pixman, fontconfig, freetype, xorg
 , gobjectSupport ? true, glib
 , xcbSupport ? true # no longer experimental since 1.12
-, glSupport ? true, libGL ? null # libGLU_combined is no longer a big dependency
+, libGLSupported
+, glSupport ? config.cairo.gl or (libGLSupported && stdenv.isLinux && !stdenv.isAarch32 && !stdenv.isMips)
+, libGL ? null # libGLU_combined is no longer a big dependency
 , pdfSupport ? true
 , darwin
 }:
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 7e99a0c18d7d..cb4571265af7 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -94,7 +94,8 @@ stdenv.mkDerivation ({
       })
     ]
     ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch
-    ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch;
+    ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch
+    ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch;
 
   postPatch =
     ''
diff --git a/pkgs/development/libraries/glibc/darwin-cross-build.patch b/pkgs/development/libraries/glibc/darwin-cross-build.patch
new file mode 100644
index 000000000000..7b224924104b
--- /dev/null
+++ b/pkgs/development/libraries/glibc/darwin-cross-build.patch
@@ -0,0 +1,103 @@
+enable cross-compilation of glibc on Darwin (build=Darwin, host=Linux)
+* increase ulimit for open files: macOS default of 256 is too low for glibc build system
+* use host version of ar, which is given by environment variable
+* build system uses stamp.os and stamp.oS files, which only differ in case;
+  this fails on macOS, so replace .oS with .o_S
+* libintl.h does not exist (and is not needed) on macOS
+
+--- glibc-2.27/Makefile.in	2018-02-01 17:17:18.000000000 +0100
++++ glibc-2.27/Makefile.in	2019-02-15 17:38:27.022965553 +0100
+@@ -6,9 +6,11 @@
+ .PHONY: all install bench
+ 
+ all .DEFAULT:
+-	$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
++	ulimit -n 1024; \
++	$(MAKE) -r AR=$$AR PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
+ 
+ install:
++	ulimit -n 1024; \
+ 	LC_ALL=C; export LC_ALL; \
+ 	$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
+ 
+--- glibc-2.27/Makerules	2018-02-01 17:17:18.000000000 +0100
++++ glibc-2.27/Makerules	2019-02-15 17:43:11.196039000 +0100
+@@ -915,8 +915,8 @@
+ ifndef objects
+ 
+ # Create the stamp$o files to keep the parent makefile happy.
+-subdir_lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
+-$(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o):
++subdir_lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$(subst .oS,.o_S,$o))
++$(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$(subst .oS,.o_S,$o)):
+ 	$(make-target-directory)
+ 	rm -f $@; > $@
+ else
+@@ -927,7 +927,7 @@
+ # The parent will then actually add them all to the archive in the
+ # archive rule, below.
+ define o-iterator-doit
+-$(objpfx)stamp$o: $(o-objects); $$(do-stamp)
++$(objpfx)stamp$(subst .oS,.o_S,$o): $(o-objects); $$(do-stamp)
+ endef
+ define do-stamp
+ $(make-target-directory)
+@@ -943,14 +943,14 @@
+ # on the stamp files built above.
+ define o-iterator-doit
+ $(common-objpfx)$(patsubst %,$(libtype$o),c): \
+-		$(subdirs-stamp-o) $(common-objpfx)stamp$o; $$(do-makelib)
++		$(subdirs-stamp-o) $(common-objpfx)stamp$(subst .oS,.o_S,$o); $$(do-makelib)
+ endef
+ define do-makelib
+ cd $(common-objdir) && \
+ $(AR) $(CREATE_ARFLAGS) $(@F) `cat $(patsubst $(common-objpfx)%,%,$^)`
+ endef
+ subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
+-subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
++subdirs-stamp-o = $(subst %,$(subst .oS,.o_S,$o),$(subdirs-stamps))
+ ifndef subdir
+ $(subdirs-stamps): subdir_lib;
+ endif
+@@ -961,7 +961,7 @@
+ # This makes all the object files.
+ .PHONY: objects objs libobjs extra-objs
+ objects objs: libobjs extra-objs
+-libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
++libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$(subst .oS,.o_S,$o))
+ extra-objs: $(addprefix $(objpfx),$(extra-objs))
+ 
+ # Canned sequence for building an extra library archive.
+@@ -1615,7 +1615,7 @@
+ 	$(rmobjs)
+ define rmobjs
+ $(foreach o,$(object-suffixes-for-libc),
+--rm -f $(objpfx)stamp$o $(o-objects))
++-rm -f $(objpfx)stamp$(subst .oS,.o_S,$o) $(o-objects))
+ endef
+ 
+ # Also remove the dependencies and generated source files.
+--- glibc-2.27/sunrpc/rpc_main.c	2019-02-15 17:32:43.710244513 +0100
++++ glibc-2.27/sunrpc/rpc_main.c	2019-02-15 17:23:57.139617796 +0100
+@@ -38,7 +38,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <locale.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+--- glibc-2.27/sunrpc/rpc_scan.c	2019-02-15 17:32:54.845490606 +0100
++++ glibc-2.27/sunrpc/rpc_scan.c	2019-02-15 17:24:54.288066644 +0100
+@@ -37,7 +37,9 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include "rpc_scan.h"
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index c7638ea5fe5f..8dad69eb998a 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg
+{ config, stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg
 , gdk_pixbuf, xlibsWrapper, gobject-introspection
 , xineramaSupport ? stdenv.isLinux
-, cupsSupport ? true, cups ? null
+, cupsSupport ? config.gtk2.cups or stdenv.isLinux, cups ? null
 , gdktarget ? if stdenv.isDarwin then "quartz" else "x11"
 , AppKit, Cocoa
 , fetchpatch
diff --git a/pkgs/development/libraries/libtensorflow/default.nix b/pkgs/development/libraries/libtensorflow/default.nix
index f41f6303e014..98096371e400 100644
--- a/pkgs/development/libraries/libtensorflow/default.nix
+++ b/pkgs/development/libraries/libtensorflow/default.nix
@@ -1,7 +1,7 @@
-{ stdenv
+{ config, stdenv
 , fetchurl
 , patchelf
-, cudaSupport ? false, symlinkJoin, cudatoolkit, cudnn, nvidia_x11
+, cudaSupport ? config.cudaSupport or false, symlinkJoin, cudatoolkit, cudnn, nvidia_x11
 }:
 with stdenv.lib;
 let
diff --git a/pkgs/development/libraries/opensubdiv/default.nix b/pkgs/development/libraries/opensubdiv/default.nix
index 614df6fb063e..57f1c9830a68 100644
--- a/pkgs/development/libraries/opensubdiv/default.nix
+++ b/pkgs/development/libraries/opensubdiv/default.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, xorg, libGLU
+{ config, lib, stdenv, fetchFromGitHub, cmake, pkgconfig, xorg, libGLU
 , libGL, glew, ocl-icd, python3
-, cudaSupport ? false, cudatoolkit
+, cudaSupport ? config.cudaSupport or false, cudatoolkit
 , darwin
 }:
 
diff --git a/pkgs/development/libraries/physics/rivet/default.nix b/pkgs/development/libraries/physics/rivet/default.nix
index 30f8ad8e8a32..01214878cd8b 100644
--- a/pkgs/development/libraries/physics/rivet/default.nix
+++ b/pkgs/development/libraries/physics/rivet/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "rivet-${version}";
-  version = "2.6.2";
+  version = "2.7.0";
 
   src = fetchurl {
     url = "https://www.hepforge.org/archive/rivet/Rivet-${version}.tar.bz2";
-    sha256 = "0yp3mllr2b4bhsmixjmmpl2n4x78bgw74a9xy2as4f10q3alkplx";
+    sha256 = "12mlj2j1glidjhiaxlr25qz2vfb865wip1vwwg8vlyd3yzisf533";
   };
 
   patches = [
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     substituteInPlace analyses/Makefile.in \
       --replace "!(tmp)" ""
     substituteInPlace bin/rivet-buildplugin.in \
-      --replace '"which"' '"${which}/bin/which"' \
+      --replace 'which' '"${which}/bin/which"' \
       --replace 'mycxx=' 'mycxx=${stdenv.cc}/bin/${if stdenv.cc.isClang or false then "clang++" else "g++"}  #' \
       --replace 'mycxxflags="' "mycxxflags=\"-std=c++11 $NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
   '';
diff --git a/pkgs/development/libraries/qt-5/5.11/default.nix b/pkgs/development/libraries/qt-5/5.11/default.nix
index 59dab2beabd0..b6e24c632224 100644
--- a/pkgs/development/libraries/qt-5/5.11/default.nix
+++ b/pkgs/development/libraries/qt-5/5.11/default.nix
@@ -62,8 +62,8 @@ let
     qtscript = [ ./qtscript.patch ];
     qtserialport = [ ./qtserialport.patch ];
     qttools = [ ./qttools.patch ];
-    qtwebengine =
-         optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch
+    qtwebengine = [ ./qtwebengine-no-build-skip.patch ]
+      ++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch
       ++ optional stdenv.isDarwin ./qtwebengine-darwin-sdk-10.10.patch;
     qtwebkit = [ ./qtwebkit.patch ];
   };
@@ -94,7 +94,9 @@ let
       };
 
       qtcharts = callPackage ../modules/qtcharts.nix {};
-      qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
+      qtconnectivity = callPackage ../modules/qtconnectivity.nix {
+        inherit cf-private;
+      };
       qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
       qtdoc = callPackage ../modules/qtdoc.nix {};
       qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-no-build-skip.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-no-build-skip.patch
new file mode 100644
index 000000000000..f332d5e1bb2b
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.11/qtwebengine-no-build-skip.patch
@@ -0,0 +1,12 @@
+diff --git a/qtwebengine.pro b/qtwebengine.pro
+--- a/qtwebengine.pro
++++ b/qtwebengine.pro
+@@ -5,7 +5,7 @@ runConfigure()
+ 
+ !isEmpty(skipBuildReason) {
+     SUBDIRS =
+-    log($${skipBuildReason}$${EOL})
++    error($${skipBuildReason}$${EOL})
+     log(QtWebEngine will not be built.$${EOL})
+ }
+ 
diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix
index 22535deb7678..4b002837c3d5 100644
--- a/pkgs/development/libraries/qt-5/5.12/default.nix
+++ b/pkgs/development/libraries/qt-5/5.12/default.nix
@@ -60,6 +60,7 @@ let
     qtdeclarative = [ ./qtdeclarative.patch ];
     qtscript = [ ./qtscript.patch ];
     qtserialport = [ ./qtserialport.patch ];
+    qtwebengine = [ ./qtwebengine-no-build-skip.patch ];
     qtwebkit = [ ./qtwebkit.patch ];
   };
 
@@ -89,7 +90,9 @@ let
       };
 
       qtcharts = callPackage ../modules/qtcharts.nix {};
-      qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
+      qtconnectivity = callPackage ../modules/qtconnectivity.nix {
+        inherit cf-private;
+      };
       qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
       qtdoc = callPackage ../modules/qtdoc.nix {};
       qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
diff --git a/pkgs/development/libraries/qt-5/5.12/qtwebengine-no-build-skip.patch b/pkgs/development/libraries/qt-5/5.12/qtwebengine-no-build-skip.patch
new file mode 100644
index 000000000000..f332d5e1bb2b
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.12/qtwebengine-no-build-skip.patch
@@ -0,0 +1,12 @@
+diff --git a/qtwebengine.pro b/qtwebengine.pro
+--- a/qtwebengine.pro
++++ b/qtwebengine.pro
+@@ -5,7 +5,7 @@ runConfigure()
+ 
+ !isEmpty(skipBuildReason) {
+     SUBDIRS =
+-    log($${skipBuildReason}$${EOL})
++    error($${skipBuildReason}$${EOL})
+     log(QtWebEngine will not be built.$${EOL})
+ }
+ 
diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix
index bf0ae42ea1f2..e493fc169aba 100644
--- a/pkgs/development/libraries/qt-5/5.6/default.nix
+++ b/pkgs/development/libraries/qt-5/5.6/default.nix
@@ -29,6 +29,7 @@ existing packages here and modify it as necessary.
   stdenv, fetchurl, fetchpatch, makeSetupHook,
   bison, cups ? null, harfbuzz, libGL, perl,
   gstreamer, gst-plugins-base,
+  cf-private,
 
   # options
   developerBuild ? false,
@@ -132,7 +133,9 @@ let
       /* qtactiveqt = not packaged */
       /* qtandroidextras = not packaged */
       /* qtcanvas3d = not packaged */
-      qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
+      qtconnectivity = callPackage ../modules/qtconnectivity.nix {
+        inherit cf-private;
+      };
       qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
       qtdoc = callPackage ../modules/qtdoc.nix {};
       qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix
index 68c6745bcb52..589f175efd9c 100644
--- a/pkgs/development/libraries/qt-5/5.9/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/default.nix
@@ -43,6 +43,7 @@ let
     qtscript = [ ./qtscript.patch ];
     qtserialport = [ ./qtserialport.patch ];
     qttools = [ ./qttools.patch ];
+    qtwebengine = [ ./qtwebengine-no-build-skip.patch ];
     qtwebkit = [ ./qtwebkit.patch ];
     qtvirtualkeyboard = [
       (fetchpatch {
@@ -91,7 +92,9 @@ let
       };
 
       qtcharts = callPackage ../modules/qtcharts.nix {};
-      qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
+      qtconnectivity = callPackage ../modules/qtconnectivity.nix {
+        inherit cf-private;
+      };
       qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
       qtdoc = callPackage ../modules/qtdoc.nix {};
       qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
diff --git a/pkgs/development/libraries/qt-5/5.9/qtwebengine-no-build-skip.patch b/pkgs/development/libraries/qt-5/5.9/qtwebengine-no-build-skip.patch
new file mode 100644
index 000000000000..f332d5e1bb2b
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebengine-no-build-skip.patch
@@ -0,0 +1,12 @@
+diff --git a/qtwebengine.pro b/qtwebengine.pro
+--- a/qtwebengine.pro
++++ b/qtwebengine.pro
+@@ -5,7 +5,7 @@ runConfigure()
+ 
+ !isEmpty(skipBuildReason) {
+     SUBDIRS =
+-    log($${skipBuildReason}$${EOL})
++    error($${skipBuildReason}$${EOL})
+     log(QtWebEngine will not be built.$${EOL})
+ }
+ 
diff --git a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
index d866edb052b8..17e7f0ee7cff 100644
--- a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
@@ -1,8 +1,8 @@
-{ qtModule, qtbase, qtdeclarative, bluez }:
+{ qtModule, stdenv, qtbase, qtdeclarative, bluez, cf-private }:
 
 qtModule {
   name = "qtconnectivity";
   qtInputs = [ qtbase qtdeclarative ];
-  buildInputs = [ bluez ];
+  buildInputs = if stdenv.isDarwin then [ cf-private ] else [ bluez ];
   outputs = [ "out" "dev" "bin" ];
 }
diff --git a/pkgs/development/libraries/tpm2-tss/default.nix b/pkgs/development/libraries/tpm2-tss/default.nix
new file mode 100644
index 000000000000..0ea8107cad1b
--- /dev/null
+++ b/pkgs/development/libraries/tpm2-tss/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, lib, fetchurl
+, cmocka, doxygen, ibm-sw-tpm2, iproute, openssl, perl, pkgconfig, procps
+, uthash, which }:
+
+stdenv.mkDerivation rec {
+  pname = "tpm2-tss";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "10r5wgrq21p0y700gh5iirh26pc5gsaib2b8b2nzmbr27apiw4y9";
+  };
+
+  nativeBuildInputs = [
+    doxygen perl pkgconfig
+    # For unit tests and integration tests.
+    ibm-sw-tpm2 iproute procps which
+  ];
+  buildInputs = [
+    openssl
+    # For unit tests and integration tests.
+    cmocka uthash
+  ];
+
+  postPatch = "patchShebangs script";
+
+  configureFlags = [
+    "--enable-unit"
+    "--enable-integration"
+  ];
+
+  doCheck = true;
+
+  postInstall = ''
+    # Do not install the upstream udev rules, they rely on specific
+    # users/groups which aren't guaranteed to exist on the system.
+    rm -R $out/lib/udev
+  '';
+
+  meta = with lib; {
+    description = "OSS implementation of the TCG TPM2 Software Stack (TSS2)";
+    homepage = https://github.com/tpm2-software/tpm2-tss;
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ delroth ];
+  };
+}
diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix
index ad1cc2efc879..b4c79d7f8164 100644
--- a/pkgs/development/libraries/xgboost/default.nix
+++ b/pkgs/development/libraries/xgboost/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, lib, fetchgit, cmake
-, cudaSupport ? false, cudatoolkit
+{ config, stdenv, lib, fetchgit, cmake
+, cudaSupport ? config.cudaSupport or false, cudatoolkit
 , ncclSupport ? false, nccl
 , llvmPackages
 }: