31 stdenv.mkDerivation rec {
32 pname = if withDPDK then "openvswitch-dpdk" else "openvswitch";
35 src = fetchFromGitHub {
36 owner = "openvswitch";
39 hash = "sha256-EudcANZ0aUImQ/HWSX1PRklvhP2D5L3ugXaC0GKyF0Q=";
48 # 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
49 ./patches/disable-bash-arg-completion-test.patch
62 sphinxBuilders = [ "man" ];
64 sphinxRoot = "./Documentation";
76 ++ (lib.optionals withDPDK [
82 preConfigure = "./boot.sh";
85 "--localstatedir=/var"
86 "--sharedstatedir=/var"
87 "--sbindir=$(out)/bin"
88 ] ++ (lib.optionals withDPDK [ "--with-dpdk=shared" ]);
90 # Leave /var out of this!
92 "LOGDIR=$(TMPDIR)/dummy"
93 "RUNDIR=$(TMPDIR)/dummy"
94 "PKIDIR=$(TMPDIR)/dummy"
97 enableParallelBuilding = true;
100 installShellCompletion --bash utilities/ovs-appctl-bashcomp.bash
101 installShellCompletion --bash utilities/ovs-vsctl-bashcomp.bash
103 wrapProgram $out/bin/ovs-l3ping \
104 --prefix PYTHONPATH : $out/share/openvswitch/python
106 wrapProgram $out/bin/ovs-tcpdump \
107 --prefix PATH : ${lib.makeBinPath [ tcpdump ]} \
108 --prefix PYTHONPATH : $out/share/openvswitch/python
113 export TESTSUITEFLAGS="-j$NIX_BUILD_CORES"
121 ++ (with python3.pkgs; [
130 default = nixosTests.openvswitch;
131 incus = nixosTests.incus-lts.openvswitch;
134 updateScript = nix-update-script { };
138 changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
139 description = "Multilayer virtual switch";
141 Open vSwitch is a production quality, multilayer virtual switch
142 licensed under the open source Apache 2.0 license. It is
143 designed to enable massive network automation through
144 programmatic extension, while still supporting standard
145 management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
146 RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
147 support distribution across multiple physical servers similar
148 to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
150 homepage = "https://www.openvswitch.org/";
151 license = licenses.asl20;
152 maintainers = with maintainers; [
158 platforms = platforms.linux;