depot/third_party/nixpkgs/pkgs/development/python-modules/python-ulid/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

53 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
hatch-fancy-pypi-readme,
hatch-vcs,
hatchling,
pydantic,
freezegun,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "python-ulid";
version = "2.7.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "mdomke";
repo = "python-ulid";
rev = "refs/tags/${version}";
hash = "sha256-Z9rYqekhrYa8ab17AVmKyObvq4HTOij7+LMlvRSqUQM=";
};
build-system = [
hatch-fancy-pypi-readme
hatch-vcs
hatchling
];
optional-dependencies = {
pydantic = [ pydantic ];
};
nativeCheckInputs = [
freezegun
pytestCheckHook
] ++ optional-dependencies.pydantic;
pythonImportsCheck = [ "ulid" ];
meta = with lib; {
description = "ULID implementation for Python";
mainProgram = "ulid";
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 ];
};
}