Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 babel, 9 hatchling, 10 setuptools, 11 12 # dependencies 13 markupsafe, 14 15 # optional-dependencies 16 email-validator, 17 18 # tests 19 pytestCheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "wtforms"; 24 version = "3.1.2"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.7"; 28 29 src = fetchFromGitHub { 30 owner = "wtforms"; 31 repo = "wtforms"; 32 rev = "refs/tags/${version}"; 33 hash = "sha256-L6DmB7iVpJR775oRxuEkCKWlUJnmw8VPZTr2dZbqeEc="; 34 }; 35 36 nativeBuildInputs = [ 37 babel 38 hatchling 39 setuptools 40 ]; 41 42 propagatedBuildInputs = [ markupsafe ]; 43 44 passthru.optional-dependencies = { 45 email = [ email-validator ]; 46 }; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); 51 52 pythonImportsCheck = [ "wtforms" ]; 53 54 meta = with lib; { 55 description = "Flexible forms validation and rendering library for Python"; 56 homepage = "https://github.com/wtforms/wtforms"; 57 changelog = "https://github.com/wtforms/wtforms/blob/${version}/CHANGES.rst"; 58 license = licenses.bsd3; 59 maintainers = with maintainers; [ bhipple ]; 60 }; 61}