nixpkgs/pkgs/development/python-modules/cerberus/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
798 B
Nix
Raw Normal View History

{ 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
];
checkInputs = [
pytestCheckHook
];
preCheck = ''
export TESTDIR=$(mktemp -d)
cp -R ./cerberus/tests $TESTDIR
pushd $TESTDIR
2019-10-17 22:06:58 +00:00
'';
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;
};
}