2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
2021-03-09 03:18:52 +00:00
|
|
|
, stdenv
|
2021-01-15 22:18:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-cov
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cbor2";
|
2020-11-06 00:33:48 +00:00
|
|
|
version = "5.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-06 00:33:48 +00:00
|
|
|
sha256 = "a33aa2e5534fd74401ac95686886e655e3b2ce6383b3f958199b6e70a87c94bf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
checkInputs = [
|
2021-01-15 22:18:51 +00:00
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# https://github.com/agronholm/cbor2/issues/99
|
|
|
|
disabledTests = lib.optionals stdenv.is32bit [
|
|
|
|
"test_huge_truncated_bytes"
|
|
|
|
"test_huge_truncated_string"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
pythonImportsCheck = [ "cbor2" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-01-15 22:18:51 +00:00
|
|
|
description = "Python CBOR (de)serializer with extensive tag support";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/agronholm/cbor2";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ taneb ];
|
|
|
|
};
|
|
|
|
}
|