···
1
-
{ stdenv, fetchurl, openssl, python27, iproute, perl, kernel ? null}:
1
+
{ stdenv, fetchurl, makeWrapper
2
+
, openssl, python27, iproute, perl, kernel ? null }:
6
-
skipKernelMod = kernel == null;
9
-
stdenv.mkDerivation {
8
+
in stdenv.mkDerivation rec {
name = "openvswitch-${version}";
13
-
url = "http://openvswitch.org/releases/openvswitch-2.1.2.tar.gz";
14
-
sha256 = "16q7faqrj2pfchhn0x5s9ggi5ckcg9n62f6bnqaih064aaq2jm47";
13
+
url = "http://openvswitch.org/releases/${name}.tar.gz";
14
+
sha256 = "1lmwyhm5wmdv1l4v1v5xd36d5ra21jz9ix57nh1lgm8iqc0lj5r1";
16
-
kernel = if skipKernelMod then null else kernel.dev;
17
+
kernel = optional (_kernel != null) _kernel.dev;
19
+
buildInputs = [ makeWrapper openssl python27 perl ];
26
-
] ++ (if skipKernelMod then [] else ["--with-linux"]);
25
+
] ++ (optionals (_kernel != null) ["--with-linux"]);
# Leave /var out of this!
35
+
cp debian/ovs-monitor-ipsec $out/share/openvswitch/scripts
37
+
$out/share/openvswitch/scripts/ovs-monitor-ipsec \
38
+
$out/bin/ovs-monitor-ipsec \
39
+
--prefix PYTHONPATH : "$out/share/openvswitch/python"
40
+
substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
41
+
--replace "UnixctlServer.create(None)" "UnixctlServer.create(os.environ['UNIXCTLPATH'])"
42
+
substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
43
+
--replace "self.psk_file" "root_prefix + self.psk_file"
44
+
substituteInPlace $out/share/openvswitch/scripts/ovs-monitor-ipsec \
45
+
--replace "self.cert_dir" "root_prefix + self.cert_dir"
34
-
platforms = stdenv.lib.platforms.linux;
49
+
platforms = platforms.linux;
description = "A multilayer virtual switch";
38
-
Open vSwitch is a production quality, multilayer virtual switch
39
-
licensed under the open source Apache 2.0 license. It is
40
-
designed to enable massive network automation through
41
-
programmatic extension, while still supporting standard
42
-
management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
43
-
RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
44
-
support distribution across multiple physical servers similar
53
+
Open vSwitch is a production quality, multilayer virtual switch
54
+
licensed under the open source Apache 2.0 license. It is
55
+
designed to enable massive network automation through
56
+
programmatic extension, while still supporting standard
57
+
management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
58
+
RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
59
+
support distribution across multiple physical servers similar
to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
homepage = "http://openvswitch.org/";