depot/third_party/nixpkgs/pkgs/development/python-modules/cerberus/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01: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;
};
}