diff --git a/pkgs/development/python-modules/cerberus/default.nix b/pkgs/development/python-modules/cerberus/default.nix index 5572b15b4ca6..7686b919272f 100644 --- a/pkgs/development/python-modules/cerberus/default.nix +++ b/pkgs/development/python-modules/cerberus/default.nix @@ -1,20 +1,38 @@ -{ lib, buildPythonPackage, fetchPypi, pytestrunner, pytest }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: buildPythonPackage rec { pname = "Cerberus"; version = "1.3.4"; - src = fetchPypi { - inherit pname version; - sha256 = "d1b21b3954b2498d9a79edf16b3170a3ac1021df88d197dc2ce5928ba519237c"; + src = fetchFromGitHub { + owner = "pyeve"; + repo = "cerberus"; + rev = version; + sha256 = "03kj15cf1pbd11mxsik96m5w1m6p0fbdc4ia5ihzmq8rz28razpq"; }; - checkInputs = [ pytestrunner pytest ]; + checkInputs = [ + pytestCheckHook + ]; - checkPhase = '' - pytest -k 'not nested_oneofs' + 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";