From 9e38b81af856cd69f3f8d62b52b68e81d6356c33 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 28 Sep 2015 22:29:50 +0200 Subject: [PATCH] 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. --- pkgs/tools/networking/wget/default.nix | 8 ++++---- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix index 196bcd024d9..f7fcfdf0f26 100644 --- a/pkgs/tools/networking/wget/default.nix +++ b/pkgs/tools/networking/wget/default.nix @@ -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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4feafdebb2e..b6bea329bc6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3447,6 +3447,7 @@ let wget = callPackage ../tools/networking/wget { inherit (perlPackages) LWP; + libpsl = null; }; which = callPackage ../tools/system/which { };