22 buildPythonPackage rec {
27 disabled = pythonOlder "3.6";
29 src = fetchFromGitHub {
32 rev = "refs/tags/v${version}";
33 hash = "sha256-GvMoz2BsYWk0atrT3xmSnbV7AuO5RJoM/bOJlZ5YIn4=";
36 # Follow https://github.com/mwouts/jupytext/pull/1119 to see if the patch
37 # relaxing jupyter_packaging version can be cleaned up.
39 # Follow https://github.com/mwouts/jupytext/pull/1077 to see when the patch
40 # relaxing jupyterlab version can be cleaned up.
43 substituteInPlace pyproject.toml \
44 --replace 'jupyter_packaging~=' 'jupyter_packaging>=' \
45 --replace 'jupyterlab>=3,<=4' 'jupyterlab>=3'
55 propagatedBuildInputs = [
72 # Tests that use a Jupyter notebook require $HOME to be writable
73 export HOME=$(mktemp -d);
77 # Pre-commit tests expect the source directory to be a Git repository
78 "--ignore-glob='tests/test_pre_commit_*.py'"
82 "test_apply_black_through_jupytext" # we can't do anything about ill-formatted notebooks
83 ] ++ lib.optionals stdenv.isDarwin [
84 # requires access to trash
85 "test_load_save_rename"
88 pythonImportsCheck = [
94 description = "Jupyter notebooks as Markdown documents, Julia, Python or R scripts";
95 homepage = "https://github.com/mwouts/jupytext";
96 changelog = "https://github.com/mwouts/jupytext/releases/tag/${src.rev}";
97 license = licenses.mit;
98 maintainers = teams.jupyter.members;