]> Git — Sourcephile - sourcephile-nix.git/blob - install/overlays/tools/networking/shorewall-core/default.nix
rspamd: brittle install
[sourcephile-nix.git] / install / overlays / tools / networking / shorewall-core / default.nix
1 { stdenv, fetchurl, perl }:
2
3 stdenv.mkDerivation rec {
4 baseName = "shorewall-core";
5 version = "5.2.0.5";
6 name = "${baseName}-${version}";
7
8 src = fetchurl {
9 url = "http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/${baseName}-${version}.tar.bz2";
10 sha256 = "1156n42dz8g44d7f336dn7q97xcq6bl18b2gv2diydv02lc8fqbd";
11 };
12
13 buildInputs = [
14 perl
15 ];
16 configurePhase = ''
17 ./configure \
18 HOST=linux \
19 PREFIX=$out \
20 CONFDIR=\$PREFIX/etc \
21 SBINDIR=\$PREFIX/sbin \
22 SYSCONFDIR=\$PREFIX/etc/default \
23 VARLIB=/var/lib \
24 INITSOURCE= \
25 INITDIR= \
26 INITFILE= \
27 DEFAULT_PAGER=
28 '';
29 installPhase = ''
30 ./install.sh
31 # Remove hardcoded PATH
32 sed -i $out/share/shorewall/lib.cli \
33 -e '/^ *PATH=.*/d'
34 '';
35
36 meta = {
37 homepage = http://www.shorewall.net/;
38 description = "A gateway/firewall configuration tool for GNU/Linux";
39 longDescription = ''
40 Shorewall is a high-level tool for configuring Netfilter. You describe your
41 firewall/gateway requirements using entries in a set of configuration
42 files. Shorewall reads those configuration files and with the help of the
43 iptables, iptables-restore, ip and tc utilities, Shorewall configures
44 Netfilter and the Linux networking subsystem to match your requirements.
45 Shorewall can be used on a dedicated firewall system, a multi-function
46 gateway/router/server or on a standalone GNU/Linux system. Shorewall does
47 not use Netfilter's ipchains compatibility mode and can thus take
48 advantage of Netfilter's connection state tracking capabilities.
49 '';
50 license = stdenv.lib.licenses.gpl2Plus;
51 platforms = stdenv.lib.platforms.linux;
52 };
53 }