28 stdenv.mkDerivation rec {
32 outputs = [ "out" "lib" "dev" ];
34 src = fetchFromGitLab {
38 sha256 = "sha256-+xw1nQMBs0m9RlunyrAYaSDPnLY1yRX8zt8hKOMXQT8=";
41 # wget2_noinstall contains forbidden reference to /build/
43 substituteInPlace src/Makefile.am \
44 --replace "bin_PROGRAMS = wget2 wget2_noinstall" "bin_PROGRAMS = wget2"
69 ] ++ lib.optionals sslSupport [
71 ] ++ lib.optionals stdenv.isDarwin [
72 darwin.apple_sdk.frameworks.CoreServices
75 # TODO: include translation files
77 # copy gnulib into build dir and make writable.
78 # Otherwise ./bootstrap copies the non-writable files from nix store and fails to modify them
80 cp -r ${gnulib} gnulib
81 chmod -R u+w gnulib/{build-aux,lib}
83 ./bootstrap --no-git --gnulib-srcdir=gnulib --skip-po
87 (lib.enableFeature false "shared")
88 # TODO: https://gitlab.com/gnuwget/wget2/-/issues/537
89 (lib.withFeatureAs sslSupport "ssl" "openssl")
93 description = "Successor of GNU Wget, a file and recursive website downloader";
95 Designed and written from scratch it wraps around libwget, that provides the basic
96 functions needed by a web client.
97 Wget2 works multi-threaded and uses many features to allow fast operation.
98 In many cases Wget2 downloads much faster than Wget1.x due to HTTP2, HTTP compression,
99 parallel connections and use of If-Modified-Since HTTP header.
101 homepage = "https://gitlab.com/gnuwget/wget2";
102 # wget2 GPLv3+; libwget LGPLv3+
103 license = with licenses; [ gpl3Plus lgpl3Plus ];
104 maintainers = with maintainers; [ SuperSandro2000 ];
105 mainProgram = "wget2";