mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
7f43a41cb3
The pypi sources don't contain everything required to run tests.
42 lines
736 B
Nix
42 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;
|
|
};
|
|
}
|