1{ 2 lib, 3 buildPythonPackage, 4 pythonAtLeast, 5 pythonOlder, 6 fetchPypi, 7 hatchling, 8 hatch-nodejs-version, 9 fastjsonschema, 10 jsonschema, 11 jupyter-core, 12 traitlets, 13 pep440, 14 pytestCheckHook, 15 testpath, 16}: 17 18buildPythonPackage rec { 19 pname = "nbformat"; 20 version = "5.10.4"; 21 pyproject = true; 22 disabled = pythonOlder "3.8"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-MiFosU+Tel0RNimI7KwqSVLT2OOiy+sjGVhGMSJtWzo="; 27 }; 28 29 build-system = [ 30 hatchling 31 hatch-nodejs-version 32 ]; 33 34 dependencies = [ 35 fastjsonschema 36 jsonschema 37 jupyter-core 38 traitlets 39 ]; 40 41 pythonImportsCheck = [ "nbformat" ]; 42 43 nativeCheckInputs = [ 44 pep440 45 pytestCheckHook 46 testpath 47 ]; 48 49 disabledTestPaths = lib.optionals (pythonAtLeast "3.13") [ 50 # ResourceWarning: unclosed database in <sqlite3.Connection object at 0x7ffff54954e0> 51 "tests/test_validator.py" 52 "tests/v4/test_convert.py" 53 "tests/v4/test_json.py" 54 "tests/v4/test_validate.py" 55 ]; 56 57 # Some of the tests use localhost networking. 58 __darwinAllowLocalNetworking = true; 59 60 meta = { 61 description = "Jupyter Notebook format"; 62 mainProgram = "jupyter-trust"; 63 homepage = "https://jupyter.org/"; 64 license = lib.licenses.bsd3; 65 maintainers = with lib.maintainers; [ globin ]; 66 }; 67}