From 04f20b9290308fbe9434fb0221ffdaf5a2b0025f Mon Sep 17 00:00:00 2001 From: Emilia Bopp <contact@ebopp.de> Date: Thu, 9 Jun 2022 14:54:02 +0200 Subject: [PATCH] python3Packages.schwifty: init at 2022.6.0 --- .../python-modules/schwifty/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/schwifty/default.nix diff --git a/pkgs/development/python-modules/schwifty/default.nix b/pkgs/development/python-modules/schwifty/default.nix new file mode 100644 index 000000000000..9fbf978f7ad5 --- /dev/null +++ b/pkgs/development/python-modules/schwifty/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchPypi +, importlib-resources +, importlib-metadata +, iso3166 +, pycountry +, pytestCheckHook +, pytest-cov +, pythonOlder +}: + +buildPythonPackage rec { + pname = "schwifty"; + version = "2022.6.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-MekF96K8IPjop5764Oq6ZcvKJOTc1Qg/gV5Dz2iacBk="; + }; + + propagatedBuildInputs = [ + iso3166 + pycountry + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-resources + ] ++ lib.optionals (pythonOlder "3.7") [ + importlib-metadata + ]; + + checkInputs = [ + pytest-cov + pytestCheckHook + ]; + + pythonImportsCheck = [ + "schwifty" + ]; + + meta = with lib; { + description = "Validate/generate IBANs and BICs"; + homepage = "https://github.com/mdomke/schwifty"; + license = licenses.mit; + maintainers = with maintainers; [ milibopp ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 47d7a2f9d0c5..dd3babc72f50 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9468,6 +9468,8 @@ in { schiene = callPackage ../development/python-modules/schiene { }; + schwifty = callPackage ../development/python-modules/schwifty { }; + scikit-bio = callPackage ../development/python-modules/scikit-bio { }; scikit-build = callPackage ../development/python-modules/scikit-build { };