1{
2 lib,
3 cython,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "ulid-transform";
14 version = "0.9.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "bdraco";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-r9uxPXpmQSsL1rX4d9TH87olFbZugdGdNG++Ygjie1I=";
24 };
25
26 nativeBuildInputs = [
27 cython
28 poetry-core
29 setuptools
30 ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 postPatch = ''
35 substituteInPlace pyproject.toml \
36 --replace " --cov=ulid_transform --cov-report=term-missing:skip-covered" ""
37 '';
38
39 pythonImportsCheck = [ "ulid_transform" ];
40
41 meta = with lib; {
42 description = "Library to create and transform ULIDs";
43 homepage = "https://github.com/bdraco/ulid-transform";
44 changelog = "https://github.com/bdraco/ulid-transform/releases/tag/v${version}";
45 license = with licenses; [ mit ];
46 maintainers = with maintainers; [ fab ];
47 };
48}