Unverified Commit 666014db authored by Adam Stephens's avatar Adam Stephens
Browse files

openvswitch: remove legacy kernel module building

As of Linux 3.3 the openvswitch kernel module is part of the mainline
kernel.
parent 8a7b35c6
Loading
Loading
Loading
Loading
+15 −21
Original line number Diff line number Diff line
{
  withDPDK ? false,

  lib,
  stdenv,
  fetchFromGitHub,

  autoconf,
  automake,
  dpdk,
  fetchFromGitHub,
  installShellFiles,
  iproute2,
  kernel ? null,
  libcap_ng,
  libpcap,
  libtool,
  makeWrapper,
  nix-update-script,
  nixosTests,
  numactl,
  openssl,
  perl,
  pkg-config,
  procps,
  python3,
  tcpdump,
  sphinxHook,
  tcpdump,
  util-linux,
  which,
  makeWrapper,
  withDPDK ? false,
  dpdk,
  numactl,
  libpcap,
}:

let
  _kernel = kernel;
in
stdenv.mkDerivation rec {
  pname = if withDPDK then "openvswitch-dpdk" else "openvswitch";
  version = "3.4.0";

  kernel = lib.optional (_kernel != null) _kernel.dev;

  src = fetchFromGitHub {
    owner = "openvswitch";
    repo = "ovs";
@@ -84,14 +81,11 @@ stdenv.mkDerivation rec {

  preConfigure = "./boot.sh";

  configureFlags =
    [
  configureFlags = [
    "--localstatedir=/var"
    "--sharedstatedir=/var"
    "--sbindir=$(out)/bin"
    ]
    ++ (lib.optionals (_kernel != null) [ "--with-linux" ])
    ++ (lib.optionals withDPDK [ "--with-dpdk=shared" ]);
  ] ++ (lib.optionals withDPDK [ "--with-dpdk=shared" ]);

  # Leave /var out of this!
  installFlags = [