2022-11-20 00:34:41 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, python
|
|
|
|
|
|
|
|
# python dependencies
|
|
|
|
, awacs
|
|
|
|
, cfn-flip
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "troposphere";
|
2022-12-22 16:23:57 +01:00
|
|
|
version = "4.2.0";
|
2022-12-22 21:21:35 +01:00
|
|
|
format = "setuptools";
|
2022-11-20 00:34:41 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloudtools";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-12-22 16:23:57 +01:00
|
|
|
hash = "sha256-4flnV4WxK21NNd9FXizkw6FoGffSL27Tq/Jc87vYJbc=";
|
2022-11-20 00:34:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
2022-12-22 21:21:35 +01:00
|
|
|
changelog = "https://github.com/cloudtools/troposphere/blob/${version}/CHANGELOG.rst";
|
2022-11-20 00:34:41 +01:00
|
|
|
};
|
|
|
|
}
|