nixpkgs/pkgs/applications/networking/firehol/default.nix

60 lines
1.8 KiB
Nix
Raw Normal View History

2017-09-09 00:29:39 +02:00
{ stdenv, lib, fetchFromGitHub, pkgs
, autoconf, automake, curl, iprange, iproute2, iptables, iputils
2020-11-24 16:29:28 +01:00
, kmod, nettools, procps, tcpdump, traceroute, util-linux, whois
2017-09-09 00:29:39 +02:00
# If true, just install FireQOS without FireHOL
, onlyQOS ? false
2017-09-09 00:29:39 +02:00
}:
stdenv.mkDerivation rec {
pname = "firehol";
2021-01-18 18:36:35 +01:00
version = "3.1.7";
2017-09-09 00:29:39 +02:00
src = fetchFromGitHub {
owner = "firehol";
repo = "firehol";
rev = "v${version}";
2021-01-18 18:36:35 +01:00
sha256 = "sha256-gq7l7QoUsK+j5DUn84kD9hlUTC4hz3ds3gNJc1tRygs=";
2017-09-09 00:29:39 +02:00
};
patches = [
# configure tries to determine if `ping6` or the newer, combined
# `ping` is installed by using `ping -6` which would fail.
2021-01-01 13:44:58 +01:00
./firehol-ping6.patch
# put firehol config files in /etc/firehol (not $out/etc/firehol)
# to avoid error on startup, see #35114
2021-01-01 13:44:58 +01:00
./firehol-sysconfdir.patch
2021-01-01 13:44:58 +01:00
# we must quote "$UNAME_CMD", or the dash in
# /nix/store/...-coreutils-.../bin/uname will be interpreted as
# IFS -> error. this might be considered an upstream bug but only
# appears when there are dashes in the command path
./firehol-uname-command.patch
2017-09-09 00:29:39 +02:00
];
2021-01-01 13:44:58 +01:00
2017-09-09 00:29:39 +02:00
nativeBuildInputs = [ autoconf automake ];
buildInputs = [
curl iprange iproute2 iptables iputils kmod
2020-11-24 16:29:28 +01:00
nettools procps tcpdump traceroute util-linux whois
2017-09-09 00:29:39 +02:00
];
preConfigure = "./autogen.sh";
configureFlags = [ "--localstatedir=/var"
"--disable-doc" "--disable-man"
"--disable-update-ipsets" ] ++
2017-09-09 00:29:39 +02:00
lib.optional onlyQOS [ "--disable-firehol" ];
meta = with lib; {
2017-09-09 00:29:39 +02:00
description = "A firewall for humans";
longDescription = ''
FireHOL, an iptables stateful packet filtering firewall for humans!
FireQOS, a TC based bandwidth shaper for humans!
'';
homepage = "https://firehol.org/";
2017-09-09 00:29:39 +02:00
license = licenses.gpl2;
maintainers = with maintainers; [ oxzi ];
2017-09-09 00:29:39 +02:00
platforms = platforms.linux;
};
}