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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
977 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";
2022-12-30 19:13:00 +00:00
version = "5.4.6";
format = "setuptools";
2021-10-18 06:55:32 +00:00
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
2022-12-30 19:13:00 +00:00
hash = "sha256-uJNQDbD+Az5XDDrclWr27vxX4oACa9LYb9U9qfHllNc=";
};
2021-10-18 06:55:32 +00:00
nativeBuildInputs = [
setuptools-scm
];
nativeCheckInputs = [
pytestCheckHook
];
2021-10-18 06:55:32 +00:00
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov" ""
2021-10-18 06:55:32 +00:00
'';
# 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 ];
};
}