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