netsniff-ng: use new geolite-legacy package
This commit is contained in:
parent
1a77b59a85
commit
b011d10cee
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchFromGitHub, bison, flex, libcli, libnet
|
{ stdenv, fetchFromGitHub, bison, flex, geoip, geolite-legacy, libcli, libnet
|
||||||
, libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl
|
, libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl
|
||||||
, pkgconfig, zlib }:
|
, pkgconfig, zlib }:
|
||||||
|
|
||||||
|
@ -13,8 +13,9 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0iwnfjbxiv10zk5mfpnvs2xb88f14hv1a156kn9mhasszknp0a57";
|
sha256 = "0iwnfjbxiv10zk5mfpnvs2xb88f14hv1a156kn9mhasszknp0a57";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ bison flex libcli libnet libnl libnetfilter_conntrack
|
buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl
|
||||||
libpcap libsodium liburcu ncurses perl pkgconfig zlib ];
|
libnetfilter_conntrack libpcap libsodium liburcu ncurses perl
|
||||||
|
pkgconfig zlib ];
|
||||||
|
|
||||||
# ./configure is not autoGNU but some home-brewn magic
|
# ./configure is not autoGNU but some home-brewn magic
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
@ -25,9 +26,19 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
# Tries to install to /etc, but they're more like /share files anyway
|
# All files installed to /etc are just static data that can go in the store
|
||||||
makeFlags = "PREFIX=$(out) ETCDIR=$(out)/etc";
|
makeFlags = "PREFIX=$(out) ETCDIR=$(out)/etc";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
ln -sv ${geolite-legacy}/share/GeoIP/GeoIP.dat $out/etc/netsniff-ng/country4.dat
|
||||||
|
ln -sv ${geolite-legacy}/share/GeoIP/GeoIPv6.dat $out/etc/netsniff-ng/country6.dat
|
||||||
|
ln -sv ${geolite-legacy}/share/GeoIP/GeoLiteCity.dat $out/etc/netsniff-ng/city4.dat
|
||||||
|
ln -sv ${geolite-legacy}/share/GeoIP/GeoLiteCityv6.dat $out/etc/netsniff-ng/city6.dat
|
||||||
|
ln -sv ${geolite-legacy}/share/GeoIP/GeoIPASNum.dat $out/etc/netsniff-ng/asname4.dat
|
||||||
|
ln -sv ${geolite-legacy}/share/GeoIP/GeoIPASNumv6.dat $out/etc/netsniff-ng/asname6.dat
|
||||||
|
rm -v $out/etc/netsniff-ng/geoip.conf # updating databases after installation is impossible
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Swiss army knife for daily Linux network plumbing";
|
description = "Swiss army knife for daily Linux network plumbing";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
|
Loading…
Reference in New Issue