summary refs log tree commit diff
path: root/pkgs/development/libraries/gnutls
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-11-03 18:02:59 +0000
committerAlyssa Ross <hi@alyssa.is>2021-11-23 20:34:44 +0000
commit630883559a68a3d17fcf7a2eb08de13c2d954b27 (patch)
tree73214dc2cd8a59e12232eecf7bfe48c9546882e9 /pkgs/development/libraries/gnutls
parent93e835bd92f18bbdb13ef4f3cb1cc64f1415bffb (diff)
downloadnixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.tar
nixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.tar.gz
nixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.tar.bz2
nixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.tar.lz
nixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.tar.xz
nixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.tar.zst
nixpkgs-630883559a68a3d17fcf7a2eb08de13c2d954b27.zip
pkgsStatic.gnutls: fix build
Diffstat (limited to 'pkgs/development/libraries/gnutls')
-rw-r--r--pkgs/development/libraries/gnutls/default.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix
index 0d39abe1ac3..f5605295303 100644
--- a/pkgs/development/libraries/gnutls/default.nix
+++ b/pkgs/development/libraries/gnutls/default.nix
@@ -1,8 +1,10 @@
 { config, lib, stdenv, fetchurl, zlib, lzo, libtasn1, nettle, pkg-config, lzip
-, perl, gmp, autoconf, automake, libidn, p11-kit, libiconv
+, perl, gmp, autoconf, automake, libidn, libiconv
 , unbound, dns-root-data, gettext, util-linux
+, cxxBindings ? !stdenv.hostPlatform.isStatic # tries to link libstdc++.so
 , guileBindings ? config.gnutls.guile or false, guile
 , tpmSupport ? false, trousers, which, nettools, libunistring
+, withP11-kit ? !stdenv.hostPlatform.isStatic, p11-kit
 , withSecurity ? false, Security  # darwin Security.framework
 }:
 
@@ -51,13 +53,15 @@ stdenv.mkDerivation rec {
 
   preConfigure = "patchShebangs .";
   configureFlags =
-    lib.optionals stdenv.isLinux [
+    lib.optionals withP11-kit [
     "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
     "--with-default-trust-store-pkcs11=pkcs11:"
   ] ++ [
     "--disable-dependency-tracking"
     "--enable-fast-install"
     "--with-unbound-root-key-file=${dns-root-data}/root.key"
+    (lib.withFeature withP11-kit "p11-kit")
+    (lib.enableFeature cxxBindings "cxx")
   ] ++ lib.optional guileBindings [
     "--enable-guile"
     "--with-guile-site-dir=\${out}/share/guile/site"
@@ -67,7 +71,8 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  buildInputs = [ lzo lzip libtasn1 libidn p11-kit zlib gmp libunistring unbound gettext libiconv ]
+  buildInputs = [ lzo lzip libtasn1 libidn zlib gmp libunistring unbound gettext libiconv ]
+    ++ lib.optional (withP11-kit) p11-kit
     ++ lib.optional (isDarwin && withSecurity) Security
     ++ lib.optional (tpmSupport && stdenv.isLinux) trousers
     ++ lib.optional guileBindings guile;