Skip to content

Commit

Permalink
ferm: 2.4.1 -> 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Apr 20, 2020
1 parent d79c2dd commit 50e09a7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions pkgs/tools/networking/ferm/default.nix
Expand Up @@ -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
'';

Expand Down

0 comments on commit 50e09a7

Please sign in to comment.