depot/third_party/nixpkgs/pkgs/development/python-modules/vaa/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

55 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
flit-core,
pytestCheckHook,
cerberus,
django,
djangorestframework,
marshmallow,
pyschemes,
wtforms,
email-validator,
}:
buildPythonPackage rec {
pname = "vaa";
version = "0.2.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "life4";
repo = pname;
rev = "refs/tags/v.${version}";
hash = "sha256-24GTTJSZ55ejyHoWP1/S3DLTKvOolAJr9UhWoOm84CU=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "requires = [\"flit\"]" "requires = [\"flit_core\"]" \
--replace "build-backend = \"flit.buildapi\"" "build-backend = \"flit_core.buildapi\""
'';
nativeBuildInputs = [ flit-core ];
nativeCheckInputs = [
pytestCheckHook
cerberus
django
djangorestframework
marshmallow
pyschemes
wtforms
email-validator
];
pythonImportsCheck = [ "vaa" ];
meta = with lib; {
description = "VAlidators Adapter makes validation by any existing validator with the same interface";
homepage = "https://github.com/life4/vaa";
license = licenses.mit;
maintainers = with maintainers; [ gador ];
};
}