nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 50 lines 948 B view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, pytestCheckHook 6, pythonOlder 7, setuptools-scm 8}: 9 10buildPythonPackage rec { 11 pname = "cbor2"; 12 version = "5.4.2.post1"; 13 14 disabled = pythonOlder "3.6"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "sha256-nPIdWWBLlSnXh3yOA0Ki66rhoH/o/1aD3HX+wVhHx5c="; 19 }; 20 21 nativeBuildInputs = [ 22 setuptools-scm 23 ]; 24 25 checkInputs = [ 26 pytestCheckHook 27 ]; 28 29 postPatch = '' 30 substituteInPlace setup.cfg \ 31 --replace "--cov" "" 32 ''; 33 34 # https://github.com/agronholm/cbor2/issues/99 35 disabledTests = lib.optionals stdenv.is32bit [ 36 "test_huge_truncated_bytes" 37 "test_huge_truncated_string" 38 ]; 39 40 pythonImportsCheck = [ 41 "cbor2" 42 ]; 43 44 meta = with lib; { 45 description = "Python CBOR (de)serializer with extensive tag support"; 46 homepage = "https://github.com/agronholm/cbor2"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ taneb ]; 49 }; 50}