mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
wget: use nuke-refs to avoid runtime depeneds
That way we still preserve the compilation flags but don't retain
development headers in final closure.
(cherry picked from commit 0d59db6c85
)
This commit is contained in:
parent
9fdce08d64
commit
b7dda2027e
@ -1,6 +1,6 @@
|
|||||||
{ lib, stdenv, fetchurl, gettext, pkg-config, perlPackages
|
{ lib, stdenv, fetchurl, gettext, pkg-config, perlPackages
|
||||||
, libidn2, zlib, pcre, libuuid, libiconv, libintl
|
, libidn2, zlib, pcre, libuuid, libiconv, libintl
|
||||||
, python3, lzip, darwin
|
, nukeReferences, python3, lzip, darwin
|
||||||
, withLibpsl ? false, libpsl
|
, withLibpsl ? false, libpsl
|
||||||
, withOpenssl ? true, openssl
|
, withOpenssl ? true, openssl
|
||||||
}:
|
}:
|
||||||
@ -14,15 +14,11 @@ stdenv.mkDerivation rec {
|
|||||||
hash = "sha256-GSJcx1awoIj8gRSNxqQKDI8ymvf9hIPxx7L+UPTgih8=";
|
hash = "sha256-GSJcx1awoIj8gRSNxqQKDI8ymvf9hIPxx7L+UPTgih8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
./remove-runtime-dep-on-openssl-headers.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs doc
|
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 ]
|
buildInputs = [ libidn2 zlib pcre libuuid ]
|
||||||
++ lib.optional withOpenssl openssl
|
++ lib.optional withOpenssl openssl
|
||||||
++ lib.optional withLibpsl libpsl
|
++ lib.optional withLibpsl libpsl
|
||||||
@ -35,6 +31,12 @@ stdenv.mkDerivation rec {
|
|||||||
"--without-included-regex"
|
"--without-included-regex"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
# avoid runtime references to build-only depends
|
||||||
|
make -C src version.c
|
||||||
|
nuke-refs src/version.c
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user