net-snmp: add multiple outputs to reduce closure size
This commit is contained in:
parent
2a60519881
commit
a446ac2bb0
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, autoreconfHook, file, openssl, perl, perlPackages, unzip, nettools, ncurses }:
|
{ stdenv, fetchurl, fetchpatch, autoreconfHook, removeReferencesTo
|
||||||
|
, file, openssl, perl, perlPackages, unzip, nettools, ncurses }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "net-snmp-5.8";
|
name = "net-snmp-5.8";
|
||||||
@ -19,6 +20,8 @@ stdenv.mkDerivation rec {
|
|||||||
./0002-autoconf-version.patch
|
./0002-autoconf-version.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
outputs = [ "bin" "out" "dev" "lib" ];
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--with-default-snmp-version=3"
|
[ "--with-default-snmp-version=3"
|
||||||
"--with-sys-location=Unknown"
|
"--with-sys-location=Unknown"
|
||||||
@ -34,17 +37,21 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace testing/fulltests/support/simple_TESTCONF.sh --replace "/bin/netstat" "${nettools}/bin/netstat"
|
substituteInPlace testing/fulltests/support/simple_TESTCONF.sh --replace "/bin/netstat" "${nettools}/bin/netstat"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook nettools ];
|
nativeBuildInputs = [ autoreconfHook nettools removeReferencesTo ];
|
||||||
buildInputs = [ file perl unzip openssl ncurses ];
|
buildInputs = with perlPackages; [ file perl unzip openssl ncurses JSON Tk TermReadKey ];
|
||||||
propagatedBuildInputs = with perlPackages; [ perl JSON Tk TermReadKey ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
doCheck = false; # tries to use networking
|
doCheck = false; # tries to use networking
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for f in "$out/lib/"*.la $out/bin/net-snmp-config $out/bin/net-snmp-create-v3-user; do
|
for f in "$lib/lib/"*.la $bin/bin/net-snmp-config $bin/bin/net-snmp-create-v3-user; do
|
||||||
sed 's|-L${openssl.dev}|-L${openssl.out}|g' -i $f
|
sed 's|-L${openssl.dev}|-L${openssl.out}|g' -i $f
|
||||||
done
|
done
|
||||||
|
mkdir $dev/bin
|
||||||
|
mv $bin/bin/net-snmp-config $dev/bin
|
||||||
|
# libraries contain configure options
|
||||||
|
find $lib/lib -type f -exec remove-references-to -t $bin '{}' +
|
||||||
|
find $lib/lib -type f -exec remove-references-to -t $dev '{}' +
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user