nixpkgs/pkgs/development/python-modules/cbor2/default.nix

51 lines
942 B
Nix
Raw Normal View History

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pytestCheckHook
2021-10-18 06:55:32 +00:00
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "cbor2";
2021-10-18 06:55:32 +00:00
version = "5.4.2";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
2021-10-18 06:55:32 +00:00
sha256 = "sha256-4oPnC1WgSf82TMXmSP3lh+TZsOh+SyZkxp5jkTXms7g=";
};
2021-10-18 06:55:32 +00:00
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
pytestCheckHook
];
2021-10-18 06:55:32 +00:00
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov" ""
'';
# https://github.com/agronholm/cbor2/issues/99
disabledTests = lib.optionals stdenv.is32bit [
"test_huge_truncated_bytes"
"test_huge_truncated_string"
];
2021-10-18 06:55:32 +00:00
pythonImportsCheck = [
"cbor2"
];
meta = with lib; {
description = "Python CBOR (de)serializer with extensive tag support";
2020-04-06 13:49:14 +00:00
homepage = "https://github.com/agronholm/cbor2";
license = licenses.mit;
maintainers = with maintainers; [ taneb ];
};
}