netsniff-ng: 0.6.2 -> 0.6.3

This commit is contained in:
Drew Hess 2018-01-14 20:19:49 -08:00 committed by adisbladis
parent 7e0402632d
commit fa3d1c5dfb
No known key found for this signature in database
GPG Key ID: ED58F95069B004F5

View File

@ -1,24 +1,24 @@
{ stdenv, fetchFromGitHub, bison, flex, geoip, geolite-legacy, libcli, libnet { stdenv, fetchFromGitHub, makeWrapper, bison, flex, geoip, geolite-legacy
, libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl , libcli, libnet, libnetfilter_conntrack, libnl, libpcap, libsodium
, pkgconfig, zlib }: , liburcu, ncurses, perl, pkgconfig, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "netsniff-ng-${version}"; name = "netsniff-ng-${version}";
version = "0.6.2"; version = "0.6.3";
# Upstream recommends and supports git # Upstream recommends and supports git
src = fetchFromGitHub rec { src = fetchFromGitHub rec {
repo = "netsniff-ng"; repo = "netsniff-ng";
owner = repo; owner = repo;
rev = "v${version}"; rev = "v${version}";
sha256 = "1lz4hwgwdq3znlqjmvl7cw3g3ilbayn608h0hwqdf7v2jq6n67kg"; sha256 = "0g3105c5ha897bpwsnrp72gx4n61gspxmld594i37g8k7vwzny4l";
}; };
patches = [ ./glibc-2.26.patch ]; patches = [ ./glibc-2.26.patch ];
buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl
libnetfilter_conntrack libpcap libsodium liburcu ncurses perl libnetfilter_conntrack libpcap libsodium liburcu ncurses perl
pkgconfig zlib ]; pkgconfig zlib makeWrapper ];
# ./configure is not autoGNU but some home-brewn magic # ./configure is not autoGNU but some home-brewn magic
configurePhase = '' configurePhase = ''
@ -33,6 +33,10 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" "ETCDIR=$(out)/etc" ]; makeFlags = [ "PREFIX=$(out)" "ETCDIR=$(out)/etc" ];
postInstall = '' postInstall = ''
# trafgen and bpfc can call out to cpp to process config files.
wrapProgram "$out/sbin/trafgen" --prefix PATH ":" "${stdenv.cc}/bin"
wrapProgram "$out/sbin/bpfc" --prefix PATH ":" "${stdenv.cc}/bin"
ln -sv ${geolite-legacy}/share/GeoIP/GeoIP.dat $out/etc/netsniff-ng/country4.dat 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/GeoIPv6.dat $out/etc/netsniff-ng/country6.dat
ln -sv ${geolite-legacy}/share/GeoIP/GeoIPCity.dat $out/etc/netsniff-ng/city4.dat ln -sv ${geolite-legacy}/share/GeoIP/GeoIPCity.dat $out/etc/netsniff-ng/city4.dat