]> Git — Sourcephile - sourcephile-nix.git/blob - install/overlays/tools/networking/shorewall-core/default.nix
gitolite: update
[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 substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
18 ./configure \
19 HOST=linux \
20 PREFIX=$out \
21 CONFDIR=\$PREFIX/etc \
22 SBINDIR=\$PREFIX/sbin \
23 SYSCONFDIR=\$PREFIX/etc/default \
24 VARLIB=/var/lib \
25 INITSOURCE= \
26 INITDIR= \
27 INITFILE= \
28 DEFAULT_PAGER=
29 '';
30 installPhase = ''
31 substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
32 ./install.sh
33 # Remove hardcoded PATH
34 sed -i $out/share/shorewall/lib.cli \
35 -e '/^ *PATH=.*/d'
36 '';
37
38 meta = {
39 homepage = http://www.shorewall.net/;
40 description = "A gateway/firewall configuration tool for GNU/Linux";
41 longDescription = ''
42 Shorewall is a high-level tool for configuring Netfilter. You describe your
43 firewall/gateway requirements using entries in a set of configuration
44 files. Shorewall reads those configuration files and with the help of the
45 iptables, iptables-restore, ip and tc utilities, Shorewall configures
46 Netfilter and the Linux networking subsystem to match your requirements.
47 Shorewall can be used on a dedicated firewall system, a multi-function
48 gateway/router/server or on a standalone GNU/Linux system. Shorewall does
49 not use Netfilter's ipchains compatibility mode and can thus take
50 advantage of Netfilter's connection state tracking capabilities.
51 '';
52 license = stdenv.lib.licenses.gpl2Plus;
53 platforms = stdenv.lib.platforms.linux;
54 };
55 }