summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ofp/default.nix
blob: 5defafeba805e892e66bdc63c39687b3e52d75b5 (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
34
35
36
37
38
39
40
41
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
, openssl, libpcap, odp-dpdk, dpdk
}:

stdenv.mkDerivation rec {
  pname = "ofp";
  version = "2.0.0";

  src = fetchFromGitHub {
    owner = "OpenFastPath";
    repo = "ofp";
    rev = version;
    sha256 = "05902593fycgkwzk5g7wzgk0k40nrrgybplkdka3rqnlj6aydhqf";
  };

  nativeBuildInputs = [ pkg-config autoreconfHook ];
  buildInputs = [ openssl libpcap odp-dpdk dpdk ];

  dontDisableStatic = true;

  postPatch = ''
    substituteInPlace configure.ac --replace m4_esyscmd m4_esyscmd_s
    substituteInPlace scripts/git_hash.sh --replace /bin/bash ${stdenv.shell}
    echo ${version} > .scmversion
  '';

  configureFlags = [
    "--with-odp=${odp-dpdk}"
    "--with-odp-lib=odp-dpdk"
    "--disable-shared"
  ];

  meta = with lib; {
    description = "High performance TCP/IP stack";
    homepage = "http://www.openfastpath.org";
    license = licenses.bsd3;
    platforms =  [ "x86_64-linux" ];
    maintainers = [ maintainers.abuibrahim ];
    broken = true;
  };
}