nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 jupyter-events,
7 jupyter-server,
8 click,
9 pytest-jupyter,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "jupyter-server-fileid";
15 version = "0.9.3";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "jupyter-server";
20 repo = "jupyter_server_fileid";
21 tag = "v${version}";
22 hash = "sha256-ob7hnqU7GdaDHEPF7+gwkmsboKZgiiLzzwxbBUwYHYo=";
23 };
24
25 build-system = [ hatchling ];
26
27 dependencies = [
28 jupyter-events
29 jupyter-server
30 ];
31
32 optional-dependencies = {
33 cli = [ click ];
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 __darwinAllowLocalNetworking = true;
48
49 meta = {
50 changelog = "https://github.com/jupyter-server/jupyter_server_fileid/blob/${src.rev}/CHANGELOG.md";
51 description = "Extension that maintains file IDs for documents in a running Jupyter Server";
52 mainProgram = "jupyter-fileid";
53 homepage = "https://github.com/jupyter-server/jupyter_server_fileid";
54 license = lib.licenses.bsd3;
55 maintainers = with lib.maintainers; [ dotlambda ];
56 };
57}