1 { lib, stdenv, fetchurl, makeWrapper, pkg-config, util-linux, which
2 , procps, libcap_ng, openssl, python2, perl
3 , automake, autoconf, libtool, kernel ? null }:
9 in stdenv.mkDerivation rec {
11 pname = "openvswitch";
14 url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz";
15 sha256 = "0a8wa1lj5p28x3vq0yaxjhqmppp4hvds6hhm0j3czpp8mc09fsfq";
18 patches = [ ./patches/lts-ssl.patch ];
20 kernel = optional (_kernel != null) _kernel.dev;
22 nativeBuildInputs = [ autoconf libtool automake pkg-config makeWrapper ];
23 buildInputs = [ util-linux openssl libcap_ng python2 perl procps which ];
25 preConfigure = "./boot.sh";
28 "--localstatedir=/var"
29 "--sharedstatedir=/var"
30 "--sbindir=$(out)/bin"
31 ] ++ (optionals (_kernel != null) ["--with-linux"]);
33 # Leave /var out of this!
35 "LOGDIR=$(TMPDIR)/dummy"
36 "RUNDIR=$(TMPDIR)/dummy"
37 "PKIDIR=$(TMPDIR)/dummy"
42 substituteInPlace xenserver/opt_xensource_libexec_interface-reconfigure --replace '/usr/bin/env python' '${python2.interpreter}'
43 substituteInPlace vtep/ovs-vtep --replace '/usr/bin/env python' '${python2.interpreter}'
46 enableParallelBuilding = true;
47 doCheck = false; # bash-completion test fails with "compgen: command not found"
50 cp debian/ovs-monitor-ipsec $out/share/openvswitch/scripts
52 $out/share/openvswitch/scripts/ovs-monitor-ipsec \
53 $out/bin/ovs-monitor-ipsec \
54 --prefix PYTHONPATH : "$out/share/openvswitch/python"
55 substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
56 --replace "UnixctlServer.create(None)" "UnixctlServer.create(os.environ['UNIXCTLPATH'])"
57 substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
58 --replace "self.psk_file" "root_prefix + self.psk_file"
59 substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
60 --replace "self.cert_dir" "root_prefix + self.cert_dir"
64 platforms = platforms.linux;
65 description = "A multilayer virtual switch";
68 Open vSwitch is a production quality, multilayer virtual switch
69 licensed under the open source Apache 2.0 license. It is
70 designed to enable massive network automation through
71 programmatic extension, while still supporting standard
72 management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
73 RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
74 support distribution across multiple physical servers similar
75 to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
77 homepage = "https://www.openvswitch.org/";
78 license = licenses.asl20;
79 maintainers = with maintainers; [ netixx kmcopper ];