1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 hatch-fancy-pypi-readme,
7 hatch-vcs,
8 hatchling,
9 freezegun,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "python-ulid";
15 version = "2.2.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "mdomke";
22 repo = "python-ulid";
23 rev = "refs/tags/${version}";
24 hash = "sha256-d5jCPxWUOfw/OCtbA9Db9+s1D5DAdL+vbPR8zavgbbo=";
25 };
26
27 nativeBuildInputs = [
28 hatch-fancy-pypi-readme
29 hatch-vcs
30 hatchling
31 ];
32
33 nativeCheckInputs = [
34 freezegun
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [ "ulid" ];
39
40 meta = with lib; {
41 description = "ULID implementation for Python";
42 mainProgram = "ulid";
43 homepage = "https://github.com/mdomke/python-ulid";
44 changelog = "https://github.com/mdomke/python-ulid/blob/${src.rev}/CHANGELOG.rst";
45 license = licenses.mit;
46 maintainers = with maintainers; [ natsukium ];
47 };
48}