nixpkgs/pkgs/tools/networking/argus/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

46 lines
1.9 KiB
Nix

{ lib, stdenv, fetchurl, libpcap, bison, flex, cyrus_sasl, tcp_wrappers,
pkgconfig, procps, which, wget, lsof, net-snmp, perl }:
stdenv.mkDerivation rec {
pname = "argus";
version = "3.0.8.2";
src = fetchurl {
url = "http://qosient.com/argus/src/${pname}-${version}.tar.gz";
sha256 = "1zzf688dbbcb5z2r9v1p28rddns6znzx35nc05ygza6lp7aknkna";
};
nativeBuildInputs = [ pkgconfig bison flex ];
buildInputs = [ libpcap cyrus_sasl tcp_wrappers ];
propagatedBuildInputs = [ procps which wget lsof net-snmp ];
patchPhase = ''
substituteInPlace events/argus-extip.pl \
--subst-var-by PERLBIN ${perl}/bin/perl
substituteInPlace events/argus-lsof.pl \
--replace "\`which lsof\`" "\"${lsof}/bin/lsof\"" \
--subst-var-by PERLBIN ${perl}/bin/perl
substituteInPlace events/argus-vmstat.sh \
--replace vm_stat ${procps}/bin/vmstat
substituteInPlace events/argus-snmp.sh \
--replace /usr/bin/snmpget ${stdenv.lib.getBin net-snmp}/bin/snmpget \
--replace /usr/bin/snmpwalk ${stdenv.lib.getBin net-snmp}/bin/snmpwalk
'';
meta = with lib; {
description = "Audit Record Generation and Utilization System for networks";
longDescription = ''The Argus Project is focused on developing all
aspects of large scale network situtational awareness derived from
network activity audit. Argus, itself, is next-generation network
flow technology, processing packets, either on the wire or in
captures, into advanced network flow data. The data, its models,
formats, and attributes are designed to support Network
Operations, Performance and Security Management. If you need to
know what is going on in your network, right now or historically,
you will find Argus a useful tool. '';
homepage = "http://qosient.com/argus";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ leenaars ];
platforms = platforms.linux;
};
}