mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
56 lines
983 B
Nix
56 lines
983 B
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pythonOlder
|
|
|
|
# build-system
|
|
, setuptools
|
|
, setuptools-scm
|
|
|
|
# tests
|
|
, hypothesis
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cbor2";
|
|
version = "5.6.2";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-t1E8LeqIaJkfrX74iZiQ68+LGZubRGHDwR160670gg0=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace " --cov" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"cbor2"
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
hypothesis
|
|
pytestCheckHook
|
|
];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/agronholm/cbor2/releases/tag/${version}";
|
|
description = "Python CBOR (de)serializer with extensive tag support";
|
|
mainProgram = "cbor2";
|
|
homepage = "https://github.com/agronholm/cbor2";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|