159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
66 lines
1.2 KiB
Nix
66 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
|
|
# build-system
|
|
hatchling,
|
|
hatch-vcs,
|
|
|
|
# dependencies
|
|
importlib-resources,
|
|
iso3166,
|
|
pycountry,
|
|
rstr,
|
|
|
|
# optional-dependencies
|
|
pydantic,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
pytest-cov,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "schwifty";
|
|
version = "2024.8.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-XWdB0yGYKxz2PJVNbXpNnsG/SaF3ysZn8JjrDn/rZ7w=";
|
|
};
|
|
|
|
build-system = [
|
|
hatchling
|
|
hatch-vcs
|
|
];
|
|
|
|
dependencies = [
|
|
iso3166
|
|
pycountry
|
|
rstr
|
|
] ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ];
|
|
|
|
optional-dependencies = {
|
|
pydantic = [ pydantic ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-cov
|
|
pytestCheckHook
|
|
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
|
|
|
pythonImportsCheck = [ "schwifty" ];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/mdomke/schwifty/blob/${version}/CHANGELOG.rst";
|
|
description = "Validate/generate IBANs and BICs";
|
|
homepage = "https://github.com/mdomke/schwifty";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ milibopp ];
|
|
};
|
|
}
|