aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/cot/default.nix
diff options
context:
space:
mode:
authorEvan Stoll <evan.stoll@rjginc.com>2020-07-28 17:08:50 -0400
committerJon <jonringer@users.noreply.github.com>2020-08-07 10:10:03 -0700
commit2b09ecd1681675c70fa8b1de997de2092762af62 (patch)
tree8b6aa963f6949a0982f091bfe3800169cf2c5126 /pkgs/development/python-modules/cot/default.nix
parentb9bf9c9236ae949d393746c2a915ee57d21815a5 (diff)
pythonPackages.cot: init at 2.2.1
Diffstat (limited to '')
-rw-r--r--pkgs/development/python-modules/cot/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cot/default.nix b/pkgs/development/python-modules/cot/default.nix
new file mode 100644
index 000000000000..8952d79634d7
--- /dev/null
+++ b/pkgs/development/python-modules/cot/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, isPy3k
+, argcomplete, colorlog, pyvmomi, requests, verboselogs
+, psutil, pyopenssl, setuptools
+, mock, pytest, pytest-mock, pytestCheckHook, qemu
+}:
+
+buildPythonPackage rec {
+ pname = "cot";
+ version = "2.2.1";
+
+ disabled = !isPy3k;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "f4b3553415f90daac656f89d3e82e79b3d751793239bb173a683b4cc0ceb2635";
+ };
+
+ propagatedBuildInputs = [ colorlog pyvmomi requests verboselogs pyopenssl setuptools ]
+ ++ stdenv.lib.optional (pythonOlder "3.3") psutil;
+
+ checkInputs = [ mock pytestCheckHook pytest-mock qemu ];
+
+ # Many tests require network access and/or ovftool (https://code.vmware.com/web/tool/ovf)
+ # try enabling these tests with ovftool once/if it is added to nixpkgs
+ disabledTests = [
+ "HelperGenericTest"
+ "TestCOTAddDisk"
+ "TestCOTAddFile"
+ "TestCOTEditHardware"
+ "TestCOTEditProduct"
+ "TestCOTEditProperties"
+ "TestCOTInjectConfig"
+ "TestISO"
+ "TestOVFAPI"
+ "TestQCOW2"
+ "TestRAW"
+ "TestVMDKConversion"
+ ];
+
+
+ # argparse is part of the standardlib
+ prePatch = ''
+ substituteInPlace setup.py --replace "'argparse'," ""
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Common OVF Tool";
+ longDescription = ''
+ COT (the Common OVF Tool) is a tool for editing Open Virtualization Format (.ovf, .ova) virtual appliances,
+ with a focus on virtualized network appliances such as the Cisco CSR 1000V and Cisco IOS XRv platforms.
+ '';
+ homepage = "https://github.com/glennmatthews/cot";
+ license = licenses.mit;
+ maintainers = with maintainers; [ evanjs ];
+ };
+}