1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 hatchling,
7 jupyter-events,
8 jupyter-server,
9 click,
10 pytest-jupyter,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "jupyter-server-fileid";
16 version = "0.9.3";
17 pyproject = true;
18
19 disables = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "jupyter-server";
23 repo = "jupyter_server_fileid";
24 tag = "v${version}";
25 hash = "sha256-ob7hnqU7GdaDHEPF7+gwkmsboKZgiiLzzwxbBUwYHYo=";
26 };
27
28 build-system = [ hatchling ];
29
30 dependencies = [
31 jupyter-events
32 jupyter-server
33 ];
34
35 optional-dependencies = {
36 cli = [ click ];
37 };
38
39 pythonImportsCheck = [ "jupyter_server_fileid" ];
40
41 checkInputs = [
42 pytest-jupyter
43 pytestCheckHook
44 ];
45
46 preCheck = ''
47 export HOME=$TEMPDIR
48 '';
49
50 __darwinAllowLocalNetworking = true;
51
52 meta = {
53 changelog = "https://github.com/jupyter-server/jupyter_server_fileid/blob/${src.rev}/CHANGELOG.md";
54 description = "Extension that maintains file IDs for documents in a running Jupyter Server";
55 mainProgram = "jupyter-fileid";
56 homepage = "https://github.com/jupyter-server/jupyter_server_fileid";
57 license = lib.licenses.bsd3;
58 maintainers = with lib.maintainers; [ dotlambda ];
59 };
60}