ferm: 2.4.1 -> 2.5.1

gstqt5
Jörg Thalheim 2020-04-13 17:37:57 +01:00 committed by Frederik Rietdijk
parent b4a7b66d82
commit b1e93ddf4d
1 changed files with 12 additions and 8 deletions

View File

@ -3,23 +3,27 @@
let
inherit (stdenv.lib.versions) majorMinor;
in stdenv.mkDerivation rec {
version = "2.5";
version = "2.5.1";
pname = "ferm";
src = fetchurl {
url = "http://ferm.foo-projects.org/download/${majorMinor version}/ferm-${version}.tar.xz";
sha256 = "0lxqcpirphihpvdqrh5kq0621aqq0h2vdy9q2v85gqdhd52js20p";
sha256 = "0awl9s243sxgayr2fcmfks8xydhrmb9gy8bd9sfq738dgq7vybjb";
};
buildInputs = [ perl ipset ebtables iptables makeWrapper ];
preConfigure = ''
substituteInPlace config.mk --replace "PERL = /usr/bin/perl" "PERL = ${perl}/bin/perl"
substituteInPlace config.mk --replace "PREFIX = /usr" "PREFIX = $out"
'';
# perl is used at build time to gather the ferm version.
nativeBuildInputs = [ makeWrapper perl ];
buildInputs = [ perl ];
makeFlags = [
"PERL=perl"
"PREFIX=${placeholder "out"}"
];
postInstall = ''
rm -r $out/lib/systemd
for i in "$out/sbin/"*; do
wrapProgram "$i" --prefix PATH : "${iptables}/bin:${ipset}/bin:${ebtables}/bin"
wrapProgram "$i" --prefix PATH : "${stdenv.lib.makeBinPath [ iptables ipset ebtables ]}"
done
'';