2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
hatch-jupyter-builder,
|
|
|
|
hatch-nodejs-version,
|
|
|
|
hatchling,
|
|
|
|
pygments,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "jupyterlab-pygments";
|
|
|
|
version = "0.3.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
src = fetchPypi {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "jupyterlab_pygments";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-chrKTZApJSsRz6nRheW1r01Udyu4By+bcDb0FwBU010=";
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# jupyterlab is not necessary since we get the source from pypi
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"jupyterlab>=4.0.0,<5",' ""
|
|
|
|
'';
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
hatch-jupyter-builder
|
|
|
|
hatch-nodejs-version
|
|
|
|
hatchling
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
# no tests exist on upstream repo
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pygments ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "jupyterlab_pygments" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Jupyterlab syntax coloring theme for pygments";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://github.com/jupyterlab/jupyterlab_pygments";
|
2024-01-02 11:29:13 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
}
|