Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # build-system 7 hatchling, 8 hatch-vcs, 9 10 # dependencies 11 importlib-resources, 12 iso3166, 13 pycountry, 14 rstr, 15 16 # optional-dependencies 17 pydantic, 18 19 # tests 20 pytestCheckHook, 21 pytest-cov, 22 pythonOlder, 23}: 24 25buildPythonPackage rec { 26 pname = "schwifty"; 27 version = "2024.6.1"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.8"; 31 32 src = fetchPypi { 33 inherit pname version; 34 hash = "sha256-32+YpDIXcgldwtxU5s9V6cong70EiyEgf9QCNYdEvp0="; 35 }; 36 37 build-system = [ 38 hatchling 39 hatch-vcs 40 ]; 41 42 dependencies = [ 43 iso3166 44 pycountry 45 rstr 46 ] ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ]; 47 48 optional-dependencies = { 49 pydantic = [ pydantic ]; 50 }; 51 52 nativeCheckInputs = [ 53 pytest-cov 54 pytestCheckHook 55 ] ++ lib.flatten (lib.attrValues optional-dependencies); 56 57 pythonImportsCheck = [ "schwifty" ]; 58 59 meta = with lib; { 60 changelog = "https://github.com/mdomke/schwifty/blob/${version}/CHANGELOG.rst"; 61 description = "Validate/generate IBANs and BICs"; 62 homepage = "https://github.com/mdomke/schwifty"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ milibopp ]; 65 }; 66}