2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
hatch-jupyter-builder,
|
|
|
|
hatchling,
|
|
|
|
jupyterlab,
|
|
|
|
nbformat,
|
|
|
|
colorama,
|
|
|
|
pygments,
|
|
|
|
tornado,
|
|
|
|
requests,
|
|
|
|
gitpython,
|
|
|
|
jupyter-server,
|
|
|
|
jupyter-server-mathjax,
|
|
|
|
jinja2,
|
|
|
|
git,
|
|
|
|
pytest-tornado,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nbdime";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "4.0.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-8adgwLAMG6m0lFwWzpJXfzk/tR0YTzUbdoW6boUCCY4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# this fixes the webserver (nbdiff-web) when jupyter-server >=2.13 is used
|
|
|
|
# see https://github.com/jupyter/nbdime/issues/749
|
|
|
|
./749.patch
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
hatch-jupyter-builder
|
|
|
|
hatchling
|
|
|
|
jupyterlab
|
2022-12-17 10:02:37 +00:00
|
|
|
];
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
nbformat
|
|
|
|
colorama
|
|
|
|
pygments
|
|
|
|
tornado
|
|
|
|
requests
|
2022-12-17 10:02:37 +00:00
|
|
|
gitpython
|
2024-04-21 15:54:59 +00:00
|
|
|
jupyter-server
|
|
|
|
jupyter-server-mathjax
|
2022-07-18 16:21:45 +00:00
|
|
|
jinja2
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
git
|
2020-04-24 23:36:52 +00:00
|
|
|
pytest-tornado
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_git_diffdriver"
|
|
|
|
"test_git_difftool"
|
|
|
|
"test_git_mergedriver"
|
|
|
|
"test_git_mergetool"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME="$TEMP"
|
|
|
|
git config --global user.email "janedoe@example.com"
|
|
|
|
git config --global user.name "Jane Doe"
|
|
|
|
'';
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "nbdime" ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/jupyter/nbdime";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/jupyter/nbdime/blob/${version}/CHANGELOG.md";
|
|
|
|
description = "Tools for diffing and merging of Jupyter notebooks";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ tbenst ];
|
|
|
|
};
|
|
|
|
}
|