Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #50556 from oxij/pkgs/curl-cleanup

curl: move option defaults from `all-packages.nix` to the derivation itself

authored by

Matthew Bauer and committed by
GitHub
0925c482 7f1943be

+14 -24
+7 -7
pkgs/tools/networking/curl/7_59.nix
··· 2 2 , http2Support ? true, nghttp2 3 3 , idnSupport ? false, libidn ? null 4 4 , ldapSupport ? false, openldap ? null 5 - , zlibSupport ? false, zlib ? null 6 - , sslSupport ? false, openssl ? null 5 + , zlibSupport ? true, zlib ? null 6 + , sslSupport ? zlibSupport, openssl ? null 7 7 , gnutlsSupport ? false, gnutls ? null 8 - , scpSupport ? false, libssh2 ? null 9 - , gssSupport ? false, kerberos ? null 8 + , scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 ? null 9 + , gssSupport ? !stdenv.hostPlatform.isWindows, libkrb5 ? null 10 10 , c-aresSupport ? false, c-ares ? null 11 11 , brotliSupport ? false, brotli ? null 12 12 }: ··· 21 21 assert scpSupport -> libssh2 != null; 22 22 assert c-aresSupport -> c-ares != null; 23 23 assert brotliSupport -> brotli != null; 24 - assert gssSupport -> kerberos != null; 24 + assert gssSupport -> libkrb5 != null; 25 25 26 26 stdenv.mkDerivation rec { 27 27 name = "curl-7.59.0"; ··· 49 49 optional idnSupport libidn ++ 50 50 optional ldapSupport openldap ++ 51 51 optional zlibSupport zlib ++ 52 - optional gssSupport kerberos ++ 52 + optional gssSupport libkrb5 ++ 53 53 optional c-aresSupport c-ares ++ 54 54 optional sslSupport openssl ++ 55 55 optional gnutlsSupport gnutls ++ ··· 74 74 ( if brotliSupport then "--with-brotli" else "--without-brotli" ) 75 75 ] 76 76 ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}" 77 - ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}" 77 + ++ stdenv.lib.optional gssSupport "--with-gssapi=${libkrb5.dev}" 78 78 # For the 'urandom', maybe it should be a cross-system option 79 79 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 80 80 "--with-random=/dev/urandom"
+7 -7
pkgs/tools/networking/curl/default.nix
··· 2 2 , http2Support ? true, nghttp2 3 3 , idnSupport ? false, libidn ? null 4 4 , ldapSupport ? false, openldap ? null 5 - , zlibSupport ? false, zlib ? null 6 - , sslSupport ? false, openssl ? null 5 + , zlibSupport ? true, zlib ? null 6 + , sslSupport ? zlibSupport, openssl ? null 7 7 , gnutlsSupport ? false, gnutls ? null 8 - , scpSupport ? false, libssh2 ? null 9 - , gssSupport ? false, kerberos ? null 8 + , scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 ? null 9 + , gssSupport ? !stdenv.hostPlatform.isWindows, libkrb5 ? null 10 10 , c-aresSupport ? false, c-ares ? null 11 11 , brotliSupport ? false, brotli ? null 12 12 }: ··· 21 21 assert scpSupport -> libssh2 != null; 22 22 assert c-aresSupport -> c-ares != null; 23 23 assert brotliSupport -> brotli != null; 24 - assert gssSupport -> kerberos != null; 24 + assert gssSupport -> libkrb5 != null; 25 25 26 26 stdenv.mkDerivation rec { 27 27 name = "curl-7.61.1"; ··· 49 49 optional idnSupport libidn ++ 50 50 optional ldapSupport openldap ++ 51 51 optional zlibSupport zlib ++ 52 - optional gssSupport kerberos ++ 52 + optional gssSupport libkrb5 ++ 53 53 optional c-aresSupport c-ares ++ 54 54 optional sslSupport openssl ++ 55 55 optional gnutlsSupport gnutls ++ ··· 78 78 ( if brotliSupport then "--with-brotli" else "--without-brotli" ) 79 79 ] 80 80 ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}" 81 - ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}" 81 + ++ stdenv.lib.optional gssSupport "--with-gssapi=${libkrb5.dev}" 82 82 # For the 'urandom', maybe it should be a cross-system option 83 83 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) 84 84 "--with-random=/dev/urandom"
-10
pkgs/top-level/all-packages.nix
··· 2128 2128 2129 2129 curl_7_59 = callPackage ../tools/networking/curl/7_59.nix rec { 2130 2130 fetchurl = fetchurlBoot; 2131 - http2Support = true; 2132 - zlibSupport = true; 2133 - sslSupport = zlibSupport; 2134 - scpSupport = zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin; 2135 - gssSupport = !stdenv.hostPlatform.isWindows; 2136 2131 }; 2137 2132 2138 2133 curl = callPackage ../tools/networking/curl rec { 2139 2134 fetchurl = fetchurlBoot; 2140 - http2Support = true; 2141 - zlibSupport = true; 2142 - sslSupport = zlibSupport; 2143 - scpSupport = zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin; 2144 - gssSupport = !stdenv.hostPlatform.isWindows; 2145 2135 }; 2146 2136 2147 2137 curl_unix_socket = callPackage ../tools/networking/curl-unix-socket rec { };