3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/firehol/default.nix

59 lines
1.8 KiB
Nix
Raw Normal View History

2017-09-08 23:29:39 +01:00
{ stdenv, lib, fetchFromGitHub, pkgs
, autoconf, automake, curl, iprange, iproute, ipset, iptables, iputils
2020-11-24 15:29:28 +00:00
, kmod, nettools, procps, tcpdump, traceroute, util-linux, whois
2017-09-08 23:29:39 +01:00
# If true, just install FireQOS without FireHOL
, onlyQOS ? false
2017-09-08 23:29:39 +01:00
}:
stdenv.mkDerivation rec {
pname = "firehol";
2021-01-18 17:36:35 +00:00
version = "3.1.7";
2017-09-08 23:29:39 +01:00
src = fetchFromGitHub {
owner = "firehol";
repo = "firehol";
rev = "v${version}";
2021-01-18 17:36:35 +00:00
sha256 = "sha256-gq7l7QoUsK+j5DUn84kD9hlUTC4hz3ds3gNJc1tRygs=";
2017-09-08 23:29:39 +01: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 12:44:58 +00: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 12:44:58 +00:00
./firehol-sysconfdir.patch
2021-01-01 12:44:58 +00: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-08 23:29:39 +01:00
];
2021-01-01 12:44:58 +00:00
2017-09-08 23:29:39 +01:00
nativeBuildInputs = [ autoconf automake ];
buildInputs = [
curl iprange iproute ipset iptables iputils kmod
2020-11-24 15:29:28 +00:00
nettools procps tcpdump traceroute util-linux whois
2017-09-08 23:29:39 +01:00
];
preConfigure = "./autogen.sh";
configureFlags = [ "--localstatedir=/var"
"--disable-doc" "--disable-man" ] ++
lib.optional onlyQOS [ "--disable-firehol" ];
meta = with lib; {
2017-09-08 23:29:39 +01: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-08 23:29:39 +01:00
license = licenses.gpl2;
maintainers = with maintainers; [ oxzi ];
2017-09-08 23:29:39 +01:00
platforms = platforms.linux;
};
}