2022-01-24 21:18:07 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
2022-02-18 08:21:11 +00:00
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
|
|
|
|
# pycfmodel is pinned, https://github.com/Skyscanner/cfripper/issues/204
|
|
|
|
pycfmodel = super.pycfmodel.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.13.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Skyscanner";
|
|
|
|
repo = "pycfmodel";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-BlnLf0C/wxPXhoAH0SRB22eGWbbZ05L20rNy6qfOI+A=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with py.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2022-01-24 21:18:07 +00:00
|
|
|
pname = "cfripper";
|
2022-02-10 01:48:52 +00:00
|
|
|
version = "1.3.3";
|
2022-01-24 21:18:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Skyscanner";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-02-10 01:48:52 +00:00
|
|
|
hash = "sha256-y3h/atfFl/wDmr+YBdsWrCez4PQBEcl3xNDyTwXZIp4=";
|
2022-01-24 21:18:07 +00:00
|
|
|
};
|
|
|
|
|
2022-02-18 08:21:11 +00:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
2022-01-24 21:18:07 +00:00
|
|
|
boto3
|
|
|
|
cfn-flip
|
|
|
|
click
|
|
|
|
pluggy
|
|
|
|
pycfmodel
|
|
|
|
pydash
|
|
|
|
pyyaml
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-02-18 08:21:11 +00:00
|
|
|
checkInputs = with py.pkgs; [
|
2022-01-24 21:18:07 +00:00
|
|
|
moto
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "click~=7.1.1" "click" \
|
|
|
|
--replace "pluggy~=0.13.1" "pluggy" \
|
|
|
|
--replace "pydash~=4.7.6" "pydash"
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests are failing
|
|
|
|
"tests/test_boto3_client.py"
|
|
|
|
"tests/config/test_pluggy.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cfripper"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for analysing CloudFormation templates";
|
|
|
|
homepage = "https://github.com/Skyscanner/cfripper";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|