mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 09:34:36 +00:00
ferm: 2.4.1 -> 2.5.1
This commit is contained in:
parent
b4a7b66d82
commit
b1e93ddf4d
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user