a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
46 lines
804 B
Nix
46 lines
804 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, setuptools
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "Cerberus";
|
|
version = "1.3.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pyeve";
|
|
repo = "cerberus";
|
|
rev = version;
|
|
sha256 = "03kj15cf1pbd11mxsik96m5w1m6p0fbdc4ia5ihzmq8rz28razpq";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
preCheck = ''
|
|
export TESTDIR=$(mktemp -d)
|
|
cp -R ./cerberus/tests $TESTDIR
|
|
pushd $TESTDIR
|
|
'';
|
|
|
|
postCheck = ''
|
|
popd
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"cerberus"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://python-cerberus.org/";
|
|
description = "Lightweight, extensible schema and data validation tool for Python dictionaries";
|
|
license = licenses.mit;
|
|
};
|
|
}
|