nixpkgs-suyu/pkgs/development/python-modules/cerberus/default.nix
Martin Weinelt 7f43a41cb3 python3Packages.Cerberus: fix build
The pypi sources don't contain everything required to run tests.
2021-06-22 13:42:51 +02:00

41 lines
736 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "Cerberus";
version = "1.3.4";
src = fetchFromGitHub {
owner = "pyeve";
repo = "cerberus";
rev = version;
sha256 = "03kj15cf1pbd11mxsik96m5w1m6p0fbdc4ia5ihzmq8rz28razpq";
};
checkInputs = [
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;
};
}