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