openvswitch: generalize builder
This commit is contained in:
parent
92097927de
commit
217cf99521
3 changed files with 127 additions and 227 deletions
|
@ -1,113 +1,4 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, installShellFiles
|
||||
, iproute2
|
||||
, kernel ? null
|
||||
, libcap_ng
|
||||
, openssl
|
||||
, perl
|
||||
, pkg-config
|
||||
, procps
|
||||
, python3
|
||||
, sphinxHook
|
||||
, util-linux
|
||||
, which
|
||||
}:
|
||||
|
||||
let
|
||||
_kernel = kernel;
|
||||
in stdenv.mkDerivation rec {
|
||||
import ./generic.nix {
|
||||
version = "3.0.1";
|
||||
pname = "openvswitch";
|
||||
|
||||
kernel = lib.optional (_kernel != null) _kernel.dev;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-5KEXFtCRn1syOSKLMrrcEJtWGl/maLlUfhQ7CxlbvWg=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"man"
|
||||
];
|
||||
|
||||
patches = [
|
||||
# 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
|
||||
./patches/disable-bash-arg-completion-test.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
pkg-config
|
||||
sphinxHook
|
||||
];
|
||||
|
||||
sphinxBuilders = [
|
||||
"man"
|
||||
];
|
||||
|
||||
sphinxRoot = "./Documentation";
|
||||
|
||||
buildInputs = [
|
||||
libcap_ng
|
||||
openssl
|
||||
perl
|
||||
procps
|
||||
python3
|
||||
util-linux
|
||||
which
|
||||
];
|
||||
|
||||
preConfigure = "./boot.sh";
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--sharedstatedir=/var"
|
||||
"--sbindir=$(out)/bin"
|
||||
] ++ (lib.optionals (_kernel != null) ["--with-linux"]);
|
||||
|
||||
# Leave /var out of this!
|
||||
installFlags = [
|
||||
"LOGDIR=$(TMPDIR)/dummy"
|
||||
"RUNDIR=$(TMPDIR)/dummy"
|
||||
"PKIDIR=$(TMPDIR)/dummy"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash utilities/ovs-appctl-bashcomp.bash
|
||||
installShellCompletion --bash utilities/ovs-vsctl-bashcomp.bash
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkInputs = [
|
||||
iproute2
|
||||
] ++ (with python3.pkgs; [
|
||||
netaddr
|
||||
pyparsing
|
||||
pytest
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
|
||||
description = "A multilayer virtual switch";
|
||||
longDescription = ''
|
||||
Open vSwitch is a production quality, multilayer virtual switch
|
||||
licensed under the open source Apache 2.0 license. It is
|
||||
designed to enable massive network automation through
|
||||
programmatic extension, while still supporting standard
|
||||
management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
|
||||
RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
|
||||
support distribution across multiple physical servers similar
|
||||
to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
|
||||
'';
|
||||
homepage = "https://www.openvswitch.org/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ netixx kmcopper ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
hash = "sha256-5KEXFtCRn1syOSKLMrrcEJtWGl/maLlUfhQ7CxlbvWg=";
|
||||
}
|
||||
|
|
123
pkgs/os-specific/linux/openvswitch/generic.nix
Normal file
123
pkgs/os-specific/linux/openvswitch/generic.nix
Normal file
|
@ -0,0 +1,123 @@
|
|||
{ version
|
||||
, hash
|
||||
}:
|
||||
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, autoconf
|
||||
, automake
|
||||
, installShellFiles
|
||||
, iproute2
|
||||
, kernel ? null
|
||||
, libcap_ng
|
||||
, libtool
|
||||
, openssl
|
||||
, perl
|
||||
, pkg-config
|
||||
, procps
|
||||
, python3
|
||||
, sphinxHook
|
||||
, util-linux
|
||||
, which
|
||||
}:
|
||||
|
||||
let
|
||||
_kernel = kernel;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "openvswitch";
|
||||
inherit version;
|
||||
|
||||
kernel = lib.optional (_kernel != null) _kernel.dev;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"man"
|
||||
];
|
||||
|
||||
patches = [
|
||||
# 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
|
||||
./patches/disable-bash-arg-completion-test.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
installShellFiles
|
||||
libtool
|
||||
pkg-config
|
||||
sphinxHook
|
||||
];
|
||||
|
||||
sphinxBuilders = [
|
||||
"man"
|
||||
];
|
||||
|
||||
sphinxRoot = "./Documentation";
|
||||
|
||||
buildInputs = [
|
||||
libcap_ng
|
||||
openssl
|
||||
perl
|
||||
procps
|
||||
python3
|
||||
util-linux
|
||||
which
|
||||
];
|
||||
|
||||
preConfigure = "./boot.sh";
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--sharedstatedir=/var"
|
||||
"--sbindir=$(out)/bin"
|
||||
] ++ (lib.optionals (_kernel != null) ["--with-linux"]);
|
||||
|
||||
# Leave /var out of this!
|
||||
installFlags = [
|
||||
"LOGDIR=$(TMPDIR)/dummy"
|
||||
"RUNDIR=$(TMPDIR)/dummy"
|
||||
"PKIDIR=$(TMPDIR)/dummy"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash utilities/ovs-appctl-bashcomp.bash
|
||||
installShellCompletion --bash utilities/ovs-vsctl-bashcomp.bash
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkInputs = [
|
||||
iproute2
|
||||
] ++ (with python3.pkgs; [
|
||||
netaddr
|
||||
pyparsing
|
||||
pytest
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
|
||||
description = "A multilayer virtual switch";
|
||||
longDescription = ''
|
||||
Open vSwitch is a production quality, multilayer virtual switch
|
||||
licensed under the open source Apache 2.0 license. It is
|
||||
designed to enable massive network automation through
|
||||
programmatic extension, while still supporting standard
|
||||
management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
|
||||
RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
|
||||
support distribution across multiple physical servers similar
|
||||
to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
|
||||
'';
|
||||
homepage = "https://www.openvswitch.org/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ netixx kmcopper ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -1,118 +1,4 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, autoconf
|
||||
, automake
|
||||
, installShellFiles
|
||||
, iproute2
|
||||
, kernel ? null
|
||||
, libcap_ng
|
||||
, libtool
|
||||
, openssl
|
||||
, perl
|
||||
, pkg-config
|
||||
, procps
|
||||
, python3
|
||||
, sphinxHook
|
||||
, util-linux
|
||||
, which
|
||||
}:
|
||||
|
||||
let
|
||||
_kernel = kernel;
|
||||
in stdenv.mkDerivation rec {
|
||||
import ./generic.nix {
|
||||
version = "2.17.3";
|
||||
pname = "openvswitch";
|
||||
|
||||
kernel = lib.optional (_kernel != null) _kernel.dev;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-RGgR/JGuJFzDGQSmk3H7C/BEb3sk6yOaA320ADUwEcA=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"man"
|
||||
];
|
||||
|
||||
patches = [
|
||||
# 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
|
||||
./patches/disable-bash-arg-completion-test.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
installShellFiles
|
||||
libtool
|
||||
pkg-config
|
||||
sphinxHook
|
||||
];
|
||||
|
||||
sphinxBuilders = [
|
||||
"man"
|
||||
];
|
||||
|
||||
sphinxRoot = "./Documentation";
|
||||
|
||||
buildInputs = [
|
||||
libcap_ng
|
||||
openssl
|
||||
perl
|
||||
procps
|
||||
python3
|
||||
util-linux
|
||||
which
|
||||
];
|
||||
|
||||
preConfigure = "./boot.sh";
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--sharedstatedir=/var"
|
||||
"--sbindir=$(out)/bin"
|
||||
] ++ (lib.optionals (_kernel != null) ["--with-linux"]);
|
||||
|
||||
# Leave /var out of this!
|
||||
installFlags = [
|
||||
"LOGDIR=$(TMPDIR)/dummy"
|
||||
"RUNDIR=$(TMPDIR)/dummy"
|
||||
"PKIDIR=$(TMPDIR)/dummy"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash utilities/ovs-appctl-bashcomp.bash
|
||||
installShellCompletion --bash utilities/ovs-vsctl-bashcomp.bash
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [
|
||||
iproute2
|
||||
] ++ (with python3.pkgs; [
|
||||
netaddr
|
||||
pyparsing
|
||||
pytest
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
|
||||
description = "A multilayer virtual switch";
|
||||
longDescription = ''
|
||||
Open vSwitch is a production quality, multilayer virtual switch
|
||||
licensed under the open source Apache 2.0 license. It is
|
||||
designed to enable massive network automation through
|
||||
programmatic extension, while still supporting standard
|
||||
management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
|
||||
RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
|
||||
support distribution across multiple physical servers similar
|
||||
to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
|
||||
'';
|
||||
homepage = "https://www.openvswitch.org/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ netixx kmcopper ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
hash = "sha256-RGgR/JGuJFzDGQSmk3H7C/BEb3sk6yOaA320ADUwEcA=";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue