1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5}:
6
7buildPythonPackage rec {
8 pname = "Cerberus";
9 version = "1.3.4";
10
11 src = fetchFromGitHub {
12 owner = "pyeve";
13 repo = "cerberus";
14 rev = version;
15 sha256 = "03kj15cf1pbd11mxsik96m5w1m6p0fbdc4ia5ihzmq8rz28razpq";
16 };
17
18 checkInputs = [
19 pytestCheckHook
20 ];
21
22 preCheck = ''
23 export TESTDIR=$(mktemp -d)
24 cp -R ./cerberus/tests $TESTDIR
25 pushd $TESTDIR
26 '';
27
28 postCheck = ''
29 popd
30 '';
31
32 pythonImportsCheck = [
33 "cerberus"
34 ];
35
36 meta = with lib; {
37 homepage = "http://python-cerberus.org/";
38 description = "Lightweight, extensible schema and data validation tool for Python dictionaries";
39 license = licenses.mit;
40 };
41}