15 PATH = stdenv.lib.concatStringsSep ":"
26 stdenv.mkDerivation rec {
27 baseName = "shorewall";
29 name = "${baseName}-${version}";
32 url = "http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/${baseName}-${version}.tar.bz2";
33 sha256 = "005qv6kybk1jn1i63rchf86kwbxwwn463cxkp03q0mpc0cnj018w";
48 PATH=$PATH:${shorewall-core}/bin \
52 CONFDIR=\$PREFIX/etc \
53 SBINDIR=\$PREFIX/sbin \
54 SYSCONFDIR=\$PREFIX/etc/default \
62 # Merge with shorewall-core
63 cp -r -s ${shorewall-core} $out
64 chmod u+w $out $out/*/ $out/*/*/ $out/*/*/*/
66 # Install shorewallrc and shorewall
67 cp --remove-destination shorewallrc $out/share/shorewall/
69 cp ${shorewall-core}/sbin/shorewall $out/sbin/shorewall4
70 ln -fns shorewall4 $out/sbin/shorewall
71 # Actual config will be expected in /etc/shorewall
72 sed -i $out/share/shorewall/shorewallrc \
73 -e 's~^CONFDIR=.*~CONFDIR=/etc~'
75 sed -i $out/sbin/shorewall \
76 -e 's~^\. ${shorewall-core}\(/share/shorewall/shorewallrc\)~. '$out'\1~' \
77 -e 's~^PRODUCT=.*~&\nexport PATH=${PATH}''${PATH:+:}$PATH~'
79 sed -i $out/etc/shorewall/shorewall.conf \
80 -e 's|^LOGFILE=.*|LOGFILE=/var/log/shorewall.log|' \
81 -e 's|^PATH=.*|PATH=${PATH}|' \
82 -e 's|^PERL=.*|PERL=${perl}/bin/perl|' \
83 -e 's|^SHOREWALL_SHELL=.*|SHOREWALL_SHELL=${stdenv.shell}|'
84 # FIXME: the default GEOIPDIR=/usr/share/xt_geoip/LE may require attention.
88 homepage = http://www.shorewall.net/;
89 description = "An IPv4 gateway/firewall configuration tool for GNU/Linux";
91 Shorewall is a high-level tool for configuring Netfilter. You describe your
92 firewall/gateway requirements using entries in a set of configuration
93 files. Shorewall reads those configuration files and with the help of the
94 iptables, iptables-restore, ip and tc utilities, Shorewall configures
95 Netfilter and the Linux networking subsystem to match your requirements.
96 Shorewall can be used on a dedicated firewall system, a multi-function
97 gateway/router/server or on a standalone GNU/Linux system. Shorewall does
98 not use Netfilter's ipchains compatibility mode and can thus take
99 advantage of Netfilter's connection state tracking capabilities.
101 license = stdenv.lib.licenses.gpl2Plus;
102 platforms = stdenv.lib.platforms.linux;