ntopng: prefer nixpkgs over in-tree deps

I've also added darwin compatibility.
This commit is contained in:
Anthony Cowley 2016-05-11 19:33:08 -04:00
parent 33449c54dd
commit 86c3444e03
1 changed files with 7 additions and 4 deletions

View File

@ -1,10 +1,10 @@
{ stdenv, fetchurl, libpcap,/* gnutls, libgcrypt,*/ libxml2, glib { stdenv, fetchurl, libpcap,/* gnutls, libgcrypt,*/ libxml2, glib
, geoip, geolite-legacy, sqlite, which, autoreconfHook, git , geoip, geolite-legacy, sqlite, which, autoreconfHook, git
, pkgconfig, groff, curl, json_c , pkgconfig, groff, curl, json_c, luajit, zeromq, rrdtool
}: }:
# ntopng includes LuaJIT, mongoose, rrdtool and zeromq in its third-party/ # ntopng includes LuaJIT, mongoose, rrdtool and zeromq in its third-party/
# directory. # directory, but we use luajit, zeromq, and rrdtool from nixpkgs
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ntopng-2.0"; name = "ntopng-2.0";
@ -23,7 +23,8 @@ stdenv.mkDerivation rec {
]; ];
buildInputs = [ libpcap/* gnutls libgcrypt*/ libxml2 glib geoip geolite-legacy buildInputs = [ libpcap/* gnutls libgcrypt*/ libxml2 glib geoip geolite-legacy
sqlite which autoreconfHook git pkgconfig groff curl json_c ]; sqlite which autoreconfHook git pkgconfig groff curl json_c luajit zeromq
rrdtool ];
autoreconfPhase = '' autoreconfPhase = ''
@ -48,13 +49,15 @@ stdenv.mkDerivation rec {
rm -rf httpdocs/geoip rm -rf httpdocs/geoip
ln -s ${geolite-legacy}/share/GeoIP httpdocs/geoip ln -s ${geolite-legacy}/share/GeoIP httpdocs/geoip
'' + stdenv.lib.optionalString stdenv.isDarwin ''
sed 's|LIBS += -lstdc++.6||' -i Makefile
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "High-speed web-based traffic analysis and flow collection tool"; description = "High-speed web-based traffic analysis and flow collection tool";
homepage = http://www.ntop.org/products/ntop/; homepage = http://www.ntop.org/products/ntop/;
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.bjornfor ]; maintainers = [ maintainers.bjornfor ];
}; };
} }