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
|
2021-10-17 09:34:42 +00:00
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, hypothesis
|
|
|
|
, pytestCheckHook
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cbor2";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "5.6.3";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2021-10-17 09:34:42 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-5vCuJ1HC0zOpYOCAfAYRSU6xJFYxoWeWWsvBAFCUVdM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov" ""
|
|
|
|
'';
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
setuptools
|
2021-10-17 09:34:42 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cbor2"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
hypothesis
|
2021-01-15 22:18:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/agronholm/cbor2/releases/tag/${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
description = "Python CBOR (de)serializer with extensive tag support";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cbor2";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/agronholm/cbor2";
|
|
|
|
license = licenses.mit;
|
2024-01-13 08:15:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|