perl
];
configurePhase = ''
+ substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
./configure \
HOST=linux \
PREFIX=$out \
DEFAULT_PAGER=
'';
installPhase = ''
+ substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
./install.sh
# Remove hardcoded PATH
sed -i $out/share/shorewall/lib.cli \
self: super: {
- shorewall = super.callPackage ./shorewall {
- # For the `logger' command, we can use either `utillinux' or
- # GNU Inetutils. The latter is more portable.
- logger = if super.stdenv.isLinux then self.utillinux else self.inetutils;
- };
+ shorewall = super.callPackage ./shorewall {};
}
{ stdenv
, fetchurl
, perl
+, perlPackages
, coreutils
, iproute
, ipset
, iptables
, ebtables
, shorewall-core
-, logger
+, utillinux
, gnugrep
, gnused
}:
"${iptables}/bin"
"${ipset}/bin"
"${ebtables}/bin"
- "${logger}/bin"
+ "${utillinux}/bin"
"${gnugrep}/bin"
"${gnused}/bin"
];
iptables
ebtables
shorewall-core
- logger
+ utillinux
gnugrep
gnused
- ];
+ perl
+ ] ++ (with perlPackages; [
+ DigestSHA1
+ ]);
configurePhase = ''
+ substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
PATH=$PATH:${shorewall-core}/bin \
./configure \
HOST=linux \
ln -fns bin $out/sbin
# Install shorewallrc and shorewall
cp --remove-destination shorewallrc $out/share/shorewall/
+ substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
./install.sh
cp ${shorewall-core}/sbin/shorewall $out/sbin/shorewall4
ln -fns shorewall4 $out/sbin/shorewall
self: super: {
- shorewall6 = super.callPackage ./shorewall6 {
- # For the `logger' command, we can use either `utillinux' or
- # GNU Inetutils. The latter is more portable.
- logger = if super.stdenv.isLinux then self.utillinux else self.inetutils;
- };
+ shorewall6 = super.callPackage ./shorewall6 {};
}
, ebtables
, shorewall-core
, shorewall
-, logger
+, utillinux
, gnugrep
, gnused
}:
"${iptables}/bin"
"${ipset}/bin"
"${ebtables}/bin"
- "${logger}/bin"
+ "${utillinux}/bin"
"${gnugrep}/bin"
"${gnused}/bin"
];
iptables
ebtables
shorewall-core
- logger
+ utillinux
gnugrep
gnused
shorewall
];
configurePhase = ''
+ substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
PATH=$PATH:${shorewall-core}/bin \
./configure \
HOST=linux \
# Install shorewallrc and shorewall6
cp --remove-destination shorewallrc $out/share/shorewall/
#ln -s ${shorewall}/share/shorewall/compiler.pl $out/share/shorewall/
+ substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
./install.sh
cp --remove-destination ${shorewall-core}/sbin/shorewall $out/sbin/shorewall6
# Actual config will be expected in /etc/shorewall6