2021-06-19 11:15:17 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-03-01 00:39:39 +00:00
|
|
|
, setuptools
|
2021-06-19 11:15:17 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2018-03-31 16:13:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Cerberus";
|
2021-06-18 21:47:11 +00:00
|
|
|
version = "1.3.4";
|
2018-03-31 16:13:52 +00:00
|
|
|
|
2021-06-19 11:15:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyeve";
|
|
|
|
repo = "cerberus";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "03kj15cf1pbd11mxsik96m5w1m6p0fbdc4ia5ihzmq8rz28razpq";
|
2018-03-31 16:13:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-01 00:39:39 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-06-19 11:15:17 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2018-04-06 16:46:49 +00:00
|
|
|
|
2021-06-19 11:15:17 +00:00
|
|
|
preCheck = ''
|
|
|
|
export TESTDIR=$(mktemp -d)
|
|
|
|
cp -R ./cerberus/tests $TESTDIR
|
|
|
|
pushd $TESTDIR
|
2019-10-17 22:06:58 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-19 11:15:17 +00:00
|
|
|
postCheck = ''
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cerberus"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://python-cerberus.org/";
|
2018-03-31 16:13:52 +00:00
|
|
|
description = "Lightweight, extensible schema and data validation tool for Python dictionaries";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|