diff --git a/pkgs/by-name/wg/wget/package.nix b/pkgs/by-name/wg/wget/package.nix index 6b625571dc12..e96bcd22fd8b 100644 --- a/pkgs/by-name/wg/wget/package.nix +++ b/pkgs/by-name/wg/wget/package.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, gettext, pkg-config, perlPackages , libidn2, zlib, pcre, libuuid, libiconv, libintl -, python3, lzip, darwin +, nukeReferences, python3, lzip, darwin , withLibpsl ? false, libpsl , withOpenssl ? true, openssl }: @@ -14,15 +14,11 @@ stdenv.mkDerivation rec { hash = "sha256-GSJcx1awoIj8gRSNxqQKDI8ymvf9hIPxx7L+UPTgih8="; }; - patches = [ - ./remove-runtime-dep-on-openssl-headers.patch - ]; - preConfigure = '' patchShebangs doc ''; - nativeBuildInputs = [ gettext pkg-config perlPackages.perl lzip libiconv libintl ]; + nativeBuildInputs = [ gettext pkg-config perlPackages.perl lzip libiconv libintl nukeReferences ]; buildInputs = [ libidn2 zlib pcre libuuid ] ++ lib.optional withOpenssl openssl ++ lib.optional withLibpsl libpsl @@ -35,6 +31,12 @@ stdenv.mkDerivation rec { "--without-included-regex" ]; + preBuild = '' + # avoid runtime references to build-only depends + make -C src version.c + nuke-refs src/version.c + ''; + enableParallelBuilding = true; __darwinAllowLocalNetworking = true; diff --git a/pkgs/by-name/wg/wget/remove-runtime-dep-on-openssl-headers.patch b/pkgs/by-name/wg/wget/remove-runtime-dep-on-openssl-headers.patch deleted file mode 100644 index a6a1fcfcb37b..000000000000 --- a/pkgs/by-name/wg/wget/remove-runtime-dep-on-openssl-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/Makefile.in b/src/Makefile.in -index 1a36a9b..e279c84 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -2211,10 +2211,9 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a - echo '' >> $@ - echo '#include "version.h"' >> $@ - echo 'const char *version_string = "@VERSION@";' >> $@ -- echo 'const char *compilation_string = "'$(COMPILE)'";' \ -+ echo 'const char *compilation_string = 0;' \ - | $(ESCAPEQUOTE) >> $@ -- echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \ -+ echo 'const char *link_string = 0;' \ - | $(ESCAPEQUOTE) >> $@ - - css.c: $(srcdir)/css.l