about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-23 15:51:18 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 18:36:59 -0400
commitc99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4 (patch)
treefd1538d2d28c9846d348c681c4313865bc75010c
parentaa9dba9c3916d3512d00110389698d44da036cef (diff)
downloadnixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.tar
nixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.tar.gz
nixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.tar.bz2
nixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.tar.lz
nixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.tar.xz
nixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.tar.zst
nixlib-c99de14e60ffb176be8a6ffe8bc3d8b3d3bb36e4.zip
curl: Get rid of crossAttrs
-rw-r--r--pkgs/tools/networking/curl/7_59.nix15
-rw-r--r--pkgs/tools/networking/curl/default.nix15
2 files changed, 8 insertions, 22 deletions
diff --git a/pkgs/tools/networking/curl/7_59.nix b/pkgs/tools/networking/curl/7_59.nix
index 5980392267b0..71a87a8e9d15 100644
--- a/pkgs/tools/networking/curl/7_59.nix
+++ b/pkgs/tools/networking/curl/7_59.nix
@@ -74,7 +74,10 @@ stdenv.mkDerivation rec {
       ( if brotliSupport then "--with-brotli" else "--without-brotli" )
     ]
     ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
-    ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}";
+    ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}"
+       # For the 'urandom', maybe it should be a cross-system option
+    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
+       "--with-random=/dev/urandom";
 
   CXX = "${stdenv.cc.targetPrefix}c++";
   CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
@@ -90,16 +93,6 @@ stdenv.mkDerivation rec {
     ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so.4.4.0
   '';
 
-  crossAttrs = {
-    # We should refer to the cross built openssl
-    # For the 'urandom', maybe it should be a cross-system option
-    configureFlags = [
-        ( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" )
-        ( if gnutlsSupport then "--with-gnutls=${gnutls.crossDrv}" else "--without-gnutls" )
-        "--with-random /dev/urandom"
-      ];
-  };
-
   passthru = {
     inherit sslSupport openssl;
   };
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 06798bdcc281..d15e6084a8b9 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -78,7 +78,10 @@ stdenv.mkDerivation rec {
       ( if brotliSupport then "--with-brotli" else "--without-brotli" )
     ]
     ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
-    ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}";
+    ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}"
+       # For the 'urandom', maybe it should be a cross-system option
+    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
+       "--with-random=/dev/urandom";
 
   CXX = "${stdenv.cc.targetPrefix}c++";
   CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
@@ -94,16 +97,6 @@ stdenv.mkDerivation rec {
     ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so.4.4.0
   '';
 
-  crossAttrs = {
-    # We should refer to the cross built openssl
-    # For the 'urandom', maybe it should be a cross-system option
-    configureFlags = [
-        ( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" )
-        ( if gnutlsSupport then "--with-gnutls=${gnutls.crossDrv}" else "--without-gnutls" )
-        "--with-random=/dev/urandom"
-      ];
-  };
-
   passthru = {
     inherit sslSupport openssl;
   };