diff options
Diffstat (limited to 'pkgs/development/python-modules/python-ulid/default.nix')
-rw-r--r-- | pkgs/development/python-modules/python-ulid/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-ulid/default.nix b/pkgs/development/python-modules/python-ulid/default.nix new file mode 100644 index 00000000000..db1456dc318 --- /dev/null +++ b/pkgs/development/python-modules/python-ulid/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, hatch-fancy-pypi-readme +, hatch-vcs +, hatchling +, freezegun +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "python-ulid"; + version = "2.2.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "mdomke"; + repo = "python-ulid"; + rev = "refs/tags/${version}"; + hash = "sha256-d5jCPxWUOfw/OCtbA9Db9+s1D5DAdL+vbPR8zavgbbo="; + }; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + hatch-fancy-pypi-readme + hatch-vcs + hatchling + ]; + + nativeCheckInputs = [ + freezegun + pytestCheckHook + ]; + + pythonImportsCheck = [ "ulid" ]; + + meta = with lib; { + description = "ULID implementation for Python"; + homepage = "https://github.com/mdomke/python-ulid"; + changelog = "https://github.com/mdomke/python-ulid/blob/${src.rev}/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} |