1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9 setuptools-scm,
10
11 # tests
12 hypothesis,
13 pytest-cov-stub,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "cbor2";
19 version = "5.6.5";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-toKCBnfuHbukX32hGJjScg+S4Gvjas7CkIZ9Xr89fgk=";
27 };
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 pythonImportsCheck = [ "cbor2" ];
35
36 nativeCheckInputs = [
37 hypothesis
38 pytest-cov-stub
39 pytestCheckHook
40 ];
41
42 meta = with lib; {
43 changelog = "https://github.com/agronholm/cbor2/releases/tag/${version}";
44 description = "Python CBOR (de)serializer with extensive tag support";
45 mainProgram = "cbor2";
46 homepage = "https://github.com/agronholm/cbor2";
47 license = licenses.mit;
48 maintainers = [ ];
49 };
50}