1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 hatch-jupyter-builder,
7 hatch-nodejs-version,
8 hatchling,
9 pygments,
10}:
11
12buildPythonPackage rec {
13 pname = "jupyterlab-pygments";
14 version = "0.3.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 pname = "jupyterlab_pygments";
21 inherit version;
22 hash = "sha256-chrKTZApJSsRz6nRheW1r01Udyu4By+bcDb0FwBU010=";
23 };
24
25 # jupyterlab is not necessary since we get the source from pypi
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace '"jupyterlab>=4.0.0,<5",' ""
29 '';
30
31 nativeBuildInputs = [
32 hatch-jupyter-builder
33 hatch-nodejs-version
34 hatchling
35 ];
36
37 # no tests exist on upstream repo
38 doCheck = false;
39
40 propagatedBuildInputs = [ pygments ];
41
42 pythonImportsCheck = [ "jupyterlab_pygments" ];
43
44 meta = with lib; {
45 description = "Jupyterlab syntax coloring theme for pygments";
46 homepage = "https://github.com/jupyterlab/jupyterlab_pygments";
47 license = licenses.bsd3;
48 maintainers = [ ];
49 };
50}