mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +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.
This commit is contained in:
parent
a9b6686b4f
commit
0d59db6c85
@ -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;
|
||||
|
@ -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