2014-10-30 07:27:28 +00:00
|
|
|
{ stdenv, fetchurl, gettext, libidn
|
|
|
|
, perl, perlPackages, LWP, python3
|
|
|
|
, gnutls ? null }:
|
2008-02-02 20:39:44 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-10-30 07:27:28 +00:00
|
|
|
name = "wget-1.16";
|
2009-11-08 00:32:12 +00:00
|
|
|
|
2008-02-02 20:39:44 +00:00
|
|
|
src = fetchurl {
|
2013-02-01 21:16:56 +00:00
|
|
|
url = "mirror://gnu/wget/${name}.tar.xz";
|
2014-10-30 07:27:28 +00:00
|
|
|
sha256 = "1rxhr3jmgbwryzl51di4avqxw9m9j1z2aak8q1npns0p184xsqcj";
|
2008-02-02 20:39:44 +00:00
|
|
|
};
|
|
|
|
|
2011-11-16 14:48:27 +00:00
|
|
|
preConfigure = stdenv.lib.optionalString doCheck
|
2014-10-30 07:27:28 +00:00
|
|
|
'' for i in "doc/texi2pod.pl" "util/rmold.pl"
|
2009-11-08 00:32:12 +00:00
|
|
|
do
|
|
|
|
sed -i "$i" -e 's|/usr/bin.*perl|${perl}/bin/perl|g'
|
|
|
|
done
|
2010-04-13 11:11:42 +01:00
|
|
|
|
|
|
|
# Work around lack of DNS resolution in chroots.
|
|
|
|
for i in "tests/"*.pm "tests/"*.px
|
|
|
|
do
|
|
|
|
sed -i "$i" -e's/localhost/127.0.0.1/g'
|
|
|
|
done
|
2009-11-08 00:32:12 +00:00
|
|
|
'';
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ gettext ];
|
2014-10-30 07:27:28 +00:00
|
|
|
buildInputs = [ libidn ]
|
|
|
|
++ stdenv.lib.optionals doCheck [ perl perlPackages.IOSocketSSL LWP python3 ]
|
2009-11-08 00:32:12 +00:00
|
|
|
++ stdenv.lib.optional (gnutls != null) gnutls;
|
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
if gnutls != null
|
|
|
|
then "--with-ssl=gnutls"
|
2011-11-16 14:48:27 +00:00
|
|
|
else "--without-ssl";
|
2009-11-08 00:32:12 +00:00
|
|
|
|
2014-10-30 07:27:28 +00:00
|
|
|
doCheck = (perl != null && python3 != null);
|
2008-02-02 20:39:44 +00:00
|
|
|
|
2014-10-30 07:27:28 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Tool for retrieving files using HTTP, HTTPS, and FTP";
|
2009-11-08 00:32:12 +00:00
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' GNU Wget is a free software package for retrieving files using HTTP,
|
|
|
|
HTTPS and FTP, the most widely-used Internet protocols. It is a
|
|
|
|
non-interactive commandline tool, so it may easily be called from
|
|
|
|
scripts, cron jobs, terminals without X-Windows support, etc.
|
|
|
|
'';
|
|
|
|
|
2014-10-30 07:27:28 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2009-11-08 00:32:12 +00:00
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/wget/;
|
|
|
|
|
2014-10-30 07:27:28 +00:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
platforms = platforms.all;
|
2008-02-02 20:39:44 +00:00
|
|
|
};
|
|
|
|
}
|