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
|
2021-10-17 09:34:42 +00:00
|
|
|
, pythonOlder
|
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";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "5.4.2.post1";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-nPIdWWBLlSnXh3yOA0Ki66rhoH/o/1aD3HX+wVhHx5c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 09:34:42 +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
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
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-10-17 09:34:42 +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 ];
|
|
|
|
};
|
|
|
|
}
|