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