2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
poetry-core,
|
|
|
|
jsonpatch,
|
|
|
|
jsonschema,
|
|
|
|
six,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "warlock";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.0.1";
|
|
|
|
format = "pyproject";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bcwaldon";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-HOCLzFYmOL/tCXT+NO/tCZuVXVowNEPP3g33ZYg4+6Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
postPatch = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
sed -i '/--cov/d' pytest.ini
|
2022-02-20 05:27:41 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonpatch
|
|
|
|
jsonschema
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/bcwaldon/warlock/issues/64
|
|
|
|
"test_recursive_models"
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "warlock" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python object model built on JSON schema and JSON patch";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://github.com/bcwaldon/warlock";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|