Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 eth-hash, 5 fetchFromGitHub, 6 pytestCheckHook, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "validators"; 13 version = "0.35.0"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "python-validators"; 20 repo = "validators"; 21 tag = version; 22 hash = "sha256-b3kjKbqmfny6YnU0rlrralTgvYT06sUpckI4EDKDleA="; 23 }; 24 25 build-system = [ setuptools ]; 26 27 optional-dependencies = { 28 crypto-eth-addresses = [ eth-hash ] ++ eth-hash.optional-dependencies.pycryptodome; 29 }; 30 31 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); 32 33 pythonImportsCheck = [ "validators" ]; 34 35 meta = with lib; { 36 description = "Python Data Validation for Humans"; 37 homepage = "https://github.com/python-validators/validators"; 38 changelog = "https://github.com/python-validators/validators/blob/${version}/CHANGES.md"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ fab ]; 41 }; 42}