nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 64 lines 1.1 kB view raw
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 pythonOlder, 22}: 23 24buildPythonPackage rec { 25 pname = "schwifty"; 26 version = "2026.1.0"; 27 pyproject = true; 28 29 src = fetchPypi { 30 inherit pname version; 31 hash = "sha256-VhZBQDAewy23iyMfli9Xsf1zIAKO6Q38OWNEOW9pdJg="; 32 }; 33 34 build-system = [ 35 hatchling 36 hatch-vcs 37 ]; 38 39 dependencies = [ 40 iso3166 41 pycountry 42 rstr 43 ] 44 ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ]; 45 46 optional-dependencies = { 47 pydantic = [ pydantic ]; 48 }; 49 50 nativeCheckInputs = [ 51 pytestCheckHook 52 ] 53 ++ lib.concatAttrValues optional-dependencies; 54 55 pythonImportsCheck = [ "schwifty" ]; 56 57 meta = { 58 changelog = "https://github.com/mdomke/schwifty/blob/${version}/CHANGELOG.rst"; 59 description = "Validate/generate IBANs and BICs"; 60 homepage = "https://github.com/mdomke/schwifty"; 61 license = lib.licenses.mit; 62 maintainers = with lib.maintainers; [ milibopp ]; 63 }; 64}