2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, python
|
|
|
|
|
|
|
|
# python dependencies
|
|
|
|
, awacs
|
|
|
|
, cfn-flip
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "troposphere";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "4.3.0";
|
2022-12-28 21:21:41 +00:00
|
|
|
format = "setuptools";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloudtools";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-YciNwiLb/1fUYmlWtDRaJgtkgJi1mMt2FgeJKQi9yRg=";
|
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
|
|
|
};
|
|
|
|
}
|