diff options
Diffstat (limited to 'pkgs/servers/monitoring/net-snmp/default.nix')
-rw-r--r-- | pkgs/servers/monitoring/net-snmp/default.nix | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pkgs/servers/monitoring/net-snmp/default.nix b/pkgs/servers/monitoring/net-snmp/default.nix index 2bbab30d9ec..ed2abbc7fc8 100644 --- a/pkgs/servers/monitoring/net-snmp/default.nix +++ b/pkgs/servers/monitoring/net-snmp/default.nix @@ -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 { name = "net-snmp-5.8"; @@ -19,6 +20,8 @@ stdenv.mkDerivation rec { ./0002-autoconf-version.patch ]; + outputs = [ "bin" "out" "dev" "lib" ]; + configureFlags = [ "--with-default-snmp-version=3" "--with-sys-location=Unknown" @@ -34,17 +37,21 @@ stdenv.mkDerivation rec { substituteInPlace testing/fulltests/support/simple_TESTCONF.sh --replace "/bin/netstat" "${nettools}/bin/netstat" ''; - nativeBuildInputs = [ autoreconfHook nettools ]; - buildInputs = [ file perl unzip openssl ncurses ]; - propagatedBuildInputs = with perlPackages; [ perl JSON Tk TermReadKey ]; + nativeBuildInputs = [ autoreconfHook nettools removeReferencesTo ]; + buildInputs = with perlPackages; [ file perl unzip openssl ncurses JSON Tk TermReadKey ]; enableParallelBuilding = true; doCheck = false; # tries to use networking 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 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; { |