forked from mirrors/nixpkgs
wget: Reduce closure size
This reduces the wget closure from 377 MiB to 49 MiB, which is in particular good for EC2 images, since they include wget. The main changes: * Disable libpsl - this isn't very big itself, but it pulls in libicu, which is 36 MiB. It also adds build-time dependencies on packages like gtk-doc, dblatex, tetex etc. * Replace gnutls with openssl. The former pulls in runtime dependencies like guile, python, binutils, gcc, ncurses, etc.
This commit is contained in:
parent
cab1483a95
commit
9e38b81af8
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchurl, gettext, libidn, pkgconfig
|
||||
, perl, perlPackages, LWP, python3
|
||||
, libiconv, libpsl, gnutls ? null }:
|
||||
, libiconv, libpsl, openssl ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wget-1.16.3";
|
||||
|
@ -27,13 +27,13 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ gettext pkgconfig ];
|
||||
buildInputs = [ libidn libiconv libpsl ]
|
||||
++ stdenv.lib.optionals doCheck [ perl perlPackages.IOSocketSSL LWP python3 ]
|
||||
++ stdenv.lib.optional (gnutls != null) gnutls
|
||||
++ stdenv.lib.optional (openssl != null) openssl
|
||||
++ stdenv.lib.optional stdenv.isDarwin perl;
|
||||
|
||||
configureFlags =
|
||||
if gnutls != null then "--with-ssl=gnutls" else "--without-ssl";
|
||||
if openssl != null then "--with-ssl=openssl" else "--without-ssl";
|
||||
|
||||
doCheck = (perl != null && python3 != null && !stdenv.isDarwin);
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tool for retrieving files using HTTP, HTTPS, and FTP";
|
||||
|
|
|
@ -3447,6 +3447,7 @@ let
|
|||
|
||||
wget = callPackage ../tools/networking/wget {
|
||||
inherit (perlPackages) LWP;
|
||||
libpsl = null;
|
||||
};
|
||||
|
||||
which = callPackage ../tools/system/which { };
|
||||
|
|
Loading…
Reference in a new issue