at 24.05-pre 1.2 kB view raw
1{ lib 2, attrs 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6, pythonAtLeast 7, pythonOlder 8, typish 9, tzdata 10}: 11 12buildPythonPackage rec { 13 pname = "jsons"; 14 version = "1.6.3"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "ramonhagenaars"; 21 repo = "jsons"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-7OIByHvsqhKFOkb1q2kuxmbkkleryavYgp/T4U5hvGk="; 24 }; 25 26 propagatedBuildInputs = [ 27 typish 28 ]; 29 30 nativeCheckInputs = [ 31 attrs 32 pytestCheckHook 33 tzdata 34 ]; 35 36 disabledTestPaths = [ 37 # These tests are based on timings, which fail 38 # on slow or overloaded machines. 39 "tests/test_performance.py" 40 ]; 41 42 disabledTests = lib.optionals (pythonAtLeast "3.11") [ 43 # https://github.com/ramonhagenaars/jsons/issues/187 44 "test_dump_load_parameterized_collections" 45 ]; 46 47 pythonImportsCheck = [ 48 "jsons" 49 ]; 50 51 meta = with lib; { 52 description = "Turn Python objects into dicts or json strings and back"; 53 homepage = "https://github.com/ramonhagenaars/jsons"; 54 changelog = "https://github.com/ramonhagenaars/jsons/releases/tag/v${version}"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ fmoda3 ]; 57 }; 58}