2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, python
|
|
|
|
|
|
|
|
# python dependencies
|
|
|
|
, awacs
|
|
|
|
, cfn-flip
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "troposphere";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "4.2.0";
|
|
|
|
format = "setuptools";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloudtools";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-4flnV4WxK21NNd9FXizkw6FoGffSL27Tq/Jc87vYJbc=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cfn-flip
|
|
|
|
] ++ lib.lists.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-21 17:40:18 +00:00
|
|
|
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";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/cloudtools/troposphere/blob/${version}/CHANGELOG.rst";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
}
|