From f302f023800d111c7ca3066b2a05e95601ab4501 Mon Sep 17 00:00:00 2001 From: Benjamin Hipple Date: Sat, 19 Oct 2019 16:01:52 -0400 Subject: [PATCH] cloud-custodian: init at 0.8.45.1 Co-Authored-By: Jon --- .../networking/cloud-custodian/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/tools/networking/cloud-custodian/default.nix diff --git a/pkgs/tools/networking/cloud-custodian/default.nix b/pkgs/tools/networking/cloud-custodian/default.nix new file mode 100644 index 00000000000..a57d9f13d78 --- /dev/null +++ b/pkgs/tools/networking/cloud-custodian/default.nix @@ -0,0 +1,48 @@ +{ lib, buildPythonApplication, fetchPypi +, argcomplete +, boto3 +, botocore +, certifi +, dateutil +, jsonpatch +, jsonschema +, pyyaml +, tabulate +, urllib3 +}: + +buildPythonApplication rec { + pname = "cloud-custodian"; + version = "0.8.45.1"; + + src = fetchPypi { + pname = "c7n"; + inherit version; + sha256 = "0c199gdmpm83xfghrbzp02xliyxiygsnx2fvb35j9qpf37wzzp3z"; + }; + + propagatedBuildInputs = [ + argcomplete + boto3 + botocore + certifi + dateutil + jsonpatch + jsonschema + pyyaml + tabulate + urllib3 + ]; + + # Requires tox, many packages, and network access + checkPhase = '' + $out/bin/custodian --help + ''; + + meta = with lib; { + description = "Rules engine for cloud security, cost optimization, and governance"; + homepage = "https://cloudcustodian.io"; + license = licenses.asl20; + maintainers = with maintainers; [ bhipple ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index efff1bc328a..32c4923163f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -807,6 +807,8 @@ in claws = callPackage ../tools/misc/claws { }; + cloud-custodian = python3Packages.callPackage ../tools/networking/cloud-custodian { }; + codespell = with python3Packages; toPythonApplication codespell; cozy = callPackage ../applications/audio/cozy-audiobooks { };