2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2022-08-12 12:06:08 +00:00
|
|
|
, poetry-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsonpatch
|
|
|
|
, jsonschema
|
2022-02-10 20:34:41 +00:00
|
|
|
, 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
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonpatch
|
|
|
|
jsonschema
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|