about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/curl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/curl/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/networking/curl/default.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/tools/networking/curl/default.nix b/nixpkgs/pkgs/tools/networking/curl/default.nix
index 82245f4cd26d..89f44e8bb7b3 100644
--- a/nixpkgs/pkgs/tools/networking/curl/default.nix
+++ b/nixpkgs/pkgs/tools/networking/curl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, pkgconfig, perl
+{ stdenv, lib, fetchurl, pkg-config, perl
 , http2Support ? true, nghttp2
 , idnSupport ? false, libidn ? null
 , ldapSupport ? false, openldap ? null
@@ -7,7 +7,8 @@
 , gnutlsSupport ? false, gnutls ? null
 , wolfsslSupport ? false, wolfssl ? null
 , scpSupport ? zlibSupport && !stdenv.isSunOS && !stdenv.isCygwin, libssh2 ? null
-, gssSupport ? !stdenv.hostPlatform.isWindows, libkrb5 ? null
+, # a very sad story re static: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439039
+  gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic, libkrb5 ? null
 , c-aresSupport ? false, c-ares ? null
 , brotliSupport ? false, brotli ? null
 }:
@@ -49,12 +50,12 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  nativeBuildInputs = [ pkgconfig perl ];
+  nativeBuildInputs = [ pkg-config perl ];
 
   # Zlib and OpenSSL must be propagated because `libcurl.la' contains
   # "-lz -lssl", which aren't necessary direct build inputs of
   # applications that use Curl.
-  propagatedBuildInputs = with stdenv.lib;
+  propagatedBuildInputs = with lib;
     optional http2Support nghttp2 ++
     optional idnSupport libidn ++
     optional ldapSupport openldap ++
@@ -89,13 +90,13 @@ stdenv.mkDerivation rec {
       ( if idnSupport then "--with-libidn=${libidn.dev}" else "--without-libidn" )
       ( if brotliSupport then "--with-brotli" else "--without-brotli" )
     ]
-    ++ stdenv.lib.optional wolfsslSupport "--with-wolfssl=${wolfssl.dev}"
-    ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
-    ++ stdenv.lib.optional gssSupport "--with-gssapi=${libkrb5.dev}"
+    ++ lib.optional wolfsslSupport "--with-wolfssl=${wolfssl.dev}"
+    ++ lib.optional c-aresSupport "--enable-ares=${c-ares}"
+    ++ lib.optional gssSupport "--with-gssapi=${libkrb5.dev}"
        # For the 'urandom', maybe it should be a cross-system option
-    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
        "--with-random=/dev/urandom"
-    ++ stdenv.lib.optionals stdenv.hostPlatform.isWindows [
+    ++ lib.optionals stdenv.hostPlatform.isWindows [
       "--disable-shared"
       "--enable-static"
     ];
@@ -110,9 +111,9 @@ stdenv.mkDerivation rec {
 
     # Install completions
     make -C scripts install
-  '' + stdenv.lib.optionalString scpSupport ''
+  '' + lib.optionalString scpSupport ''
     sed '/^dependency_libs/s|${libssh2.dev}|${libssh2.out}|' -i "$out"/lib/*.la
-  '' + stdenv.lib.optionalString gnutlsSupport ''
+  '' + lib.optionalString gnutlsSupport ''
     ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so
     ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so.4
     ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so.4.4.0
@@ -122,7 +123,7 @@ stdenv.mkDerivation rec {
     inherit sslSupport openssl;
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A command line tool for transferring files with URL syntax";
     homepage    = "https://curl.haxx.se/";
     license = licenses.curl;