summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ebtables/default.nix
blob: 23bd39ff3885e7b089a4813df8b5ad812129e4cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  pname = "ebtables";
  version = "2.0.10-4";

  src = fetchurl {
    url = "mirror://sourceforge/ebtables/ebtables-v${version}.tar.gz";
    sha256 = "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw";
  };

  makeFlags =
    [ "LIBDIR=$(out)/lib" "BINDIR=$(out)/sbin" "MANDIR=$(out)/share/man"
      "ETCDIR=$(out)/etc" "INITDIR=$(TMPDIR)" "SYSCONFIGDIR=$(out)/etc/sysconfig"
      "LOCALSTATEDIR=/var"
    ];

  preBuild =
    ''
      substituteInPlace Makefile --replace '-o root -g root' ""
    '';

  NIX_CFLAGS_COMPILE = "-Wno-error";

  preInstall = "mkdir -p $out/etc/sysconfig";

  meta = with stdenv.lib; {
    description = "A filtering tool for Linux-based bridging firewalls";
    homepage = http://ebtables.sourceforge.net/;
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}