about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/jupyterlab-pygments/default.nix
blob: 0d46258eb789f7c5ecb12e23df81e1f37593c167 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, hatch-jupyter-builder
, hatch-nodejs-version
, hatchling
, pygments
}:

buildPythonPackage rec {
  pname = "jupyterlab-pygments";
  version = "0.3.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchPypi {
    pname = "jupyterlab_pygments";
    inherit version;
    hash = "sha256-chrKTZApJSsRz6nRheW1r01Udyu4By+bcDb0FwBU010=";
  };

  # jupyterlab is not necessary since we get the source from pypi
  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace '"jupyterlab>=4.0.0,<5",' ""
  '';

  nativeBuildInputs = [
    hatch-jupyter-builder
    hatch-nodejs-version
    hatchling
  ];

  # no tests exist on upstream repo
  doCheck = false;

  propagatedBuildInputs = [ pygments ];

  pythonImportsCheck = [ "jupyterlab_pygments" ];

  meta = with lib; {
    description = "Jupyterlab syntax coloring theme for pygments";
    homepage = "https://github.com/jupyterlab/jupyterlab_pygments";
    license = licenses.bsd3;
    maintainers = with maintainers; [ jonringer ];
  };
}