about summary refs log tree commit diff
path: root/pkgs/development/python-modules/troposphere/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/troposphere/default.nix')
-rw-r--r--pkgs/development/python-modules/troposphere/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/troposphere/default.nix b/pkgs/development/python-modules/troposphere/default.nix
new file mode 100644
index 0000000000000..93e09901e7d61
--- /dev/null
+++ b/pkgs/development/python-modules/troposphere/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, python
+
+  # python dependencies
+, awacs
+, cfn-flip
+, typing-extensions
+}:
+
+buildPythonPackage rec {
+  pname = "troposphere";
+  version = "4.1.0";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "cloudtools";
+    repo = pname;
+    rev = version;
+    hash = "sha256-cAn4Hty5f/RsCnUA59CxtGrhRgzVyaHe5PuQOM6lwEQ=";
+  };
+
+  propagatedBuildInputs = [
+    cfn-flip
+  ] ++ lib.lists.optionals (pythonOlder "3.8") [
+    typing-extensions
+  ];
+
+  checkInputs = [
+    awacs
+  ];
+
+  passthru.optional-dependencies = {
+    policy = [ awacs ];
+  };
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover
+  '';
+
+  pythonImportsCheck = [ "troposphere" ];
+
+  meta = with lib; {
+    description = "Library to create AWS CloudFormation descriptions";
+    maintainers = with maintainers; [ jlesquembre ];
+    license = licenses.bsd2;
+    homepage = "https://github.com/cloudtools/troposphere";
+  };
+}