Fix ntopng build
This commit is contained in:
parent
6417cf14b1
commit
8fc3bedb5a
@ -1,16 +1,36 @@
|
|||||||
{ stdenv, fetchurl, libpcap, gnutls, libgcrypt, libxml2, glib, geoip, sqlite
|
{ stdenv, fetchurl, libpcap, gnutls, libgcrypt, libxml2, glib, geoip, sqlite
|
||||||
, which
|
, which, autoreconfHook, subversion, pkgconfig, groff
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# ntopng includes LuaJIT, mongoose, rrdtool and zeromq in its third-party/
|
# ntopng includes LuaJIT, mongoose, rrdtool and zeromq in its third-party/
|
||||||
# directory.
|
# directory.
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ntopng-1.1_6932";
|
name = "ntopng-1.2.0_r8116";
|
||||||
|
|
||||||
|
geoLiteCity = fetchurl {
|
||||||
|
url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
|
||||||
|
sha256 = "1rv5yx5xgz04ymicx9pilidm19wh01ql2klwjcdakv558ndxdzd5";
|
||||||
|
};
|
||||||
|
|
||||||
|
geoLiteCityV6 = fetchurl {
|
||||||
|
url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz";
|
||||||
|
sha256 = "0j974qpi92wwnibq46h16vxpcz7yy8bbqc4k8kmby1yx994k33v4";
|
||||||
|
};
|
||||||
|
|
||||||
|
geoIPASNum = fetchurl {
|
||||||
|
url = "http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz";
|
||||||
|
sha256 = "1msnbls66npq001nmf1wmkrh6vyacgi8g5phfm1c34cz7vqnh683";
|
||||||
|
};
|
||||||
|
|
||||||
|
geoIPASNumV6 = fetchurl {
|
||||||
|
url = "http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz";
|
||||||
|
sha256 = "126syia75mkxs6xfinfp70xcfq6a3rgfmh673pzzkwxya393lbdn";
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/project/ntop/ntopng/${name}.tgz";
|
url = "mirror://sourceforge/project/ntop/ntopng/${name}.tgz";
|
||||||
sha256 = "0cdbmrsjp3bb7xzci0vfnnkmbyxwxbf47l4kbnk4ydd7xwhwdnzr";
|
sha256 = "0y7xc0l77k2qi2qalwfqiw2z361hdypirfv4k5gi652pb20jc9j6";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -18,19 +38,13 @@ stdenv.mkDerivation rec {
|
|||||||
./0002-Remove-requirement-to-have-writeable-callback-dir.patch
|
./0002-Remove-requirement-to-have-writeable-callback-dir.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ libpcap gnutls libgcrypt libxml2 glib geoip sqlite which ];
|
buildInputs = [ libpcap gnutls libgcrypt libxml2 glib geoip sqlite which autoreconfHook subversion pkgconfig groff ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
find . -name Makefile.in | xargs sed -i "s|/bin/rm|rm|"
|
||||||
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
sed -e "s|^SHELL=.*|SHELL=${stdenv.shell}|" \
|
|
||||||
-e "s|/usr/local|$out|g" \
|
|
||||||
-e "s|/bin/rm|rm|g" \
|
|
||||||
-i Makefile
|
|
||||||
|
|
||||||
sed -e "s|^SHELL=.*|SHELL=${stdenv.shell}|" \
|
|
||||||
-e "s|/usr/local|$out|g" \
|
|
||||||
-e "s|/opt/local|/non-existing-dir|g" \
|
|
||||||
-i configure
|
|
||||||
|
|
||||||
sed -e "s|/usr/local|$out|g" \
|
sed -e "s|/usr/local|$out|g" \
|
||||||
-i Ntop.cpp
|
-i Ntop.cpp
|
||||||
|
|
||||||
@ -40,6 +54,11 @@ stdenv.mkDerivation rec {
|
|||||||
-e "s|\(#define CONST_DEFAULT_CALLBACKS_DIR\).*|\1 \"$out/share/ntopng/scripts/callbacks\"|g" \
|
-e "s|\(#define CONST_DEFAULT_CALLBACKS_DIR\).*|\1 \"$out/share/ntopng/scripts/callbacks\"|g" \
|
||||||
-e "s|\(#define CONST_DEFAULT_INSTALL_DIR\).*|\1 \"$out/share/ntopng\"|g" \
|
-e "s|\(#define CONST_DEFAULT_INSTALL_DIR\).*|\1 \"$out/share/ntopng\"|g" \
|
||||||
-i ntop_defines.h
|
-i ntop_defines.h
|
||||||
|
|
||||||
|
gunzip -c $geoLiteCity > httpdocs/geoip/GeoLiteCity.dat
|
||||||
|
gunzip -c $geoLiteCityV6 > httpdocs/geoip/GeoLiteCityv6.dat
|
||||||
|
gunzip -c $geoIPASNum > httpdocs/geoip/GeoIPASNum.dat
|
||||||
|
gunzip -c $geoIPASNumV6 > httpdocs/geoip/GeoIPASNumv6.dat
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user