Skip to content

Commit

Permalink
Updated Jupyterlab (#451)
Browse files Browse the repository at this point in the history
* Update: bumpup jupyterlab

* Update lib/jupyter.nix

Signed-off-by: Rok Garbas <[email protected]>

* jupyterlab: Update overrdies

---------

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Rok Garbas <[email protected]>
  • Loading branch information
GTrunSec and garbas authored Mar 8, 2023
1 parent 7b37b4f commit 0c03a8e
Show file tree
Hide file tree
Showing 3 changed files with 902 additions and 444 deletions.
4 changes: 2 additions & 2 deletions lib/jupyter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
editablePackageSources ? {},
extraPackages ? (ps: []),
preferWheels ? false,
# groups ? ["devs"], # TODO: add groups after updating to latest poetry2nix. make sure to inherit below
groups ? [],
}: let
jupyterlabEnvBase = pkgs.poetry2nix.mkPoetryEnv {
inherit
Expand Down Expand Up @@ -184,7 +184,7 @@
--set JUPYTERLAB_DIR .jupyter/lab/share/jupyter/lab \
--set JUPYTERLAB_SETTINGS_DIR ".jupyter/lab/user-settings" \
--set JUPYTERLAB_WORKSPACES_DIR ".jupyter/lab/workspaces" \
--set JUPYTER_PATH ${lib.concatStringsSep ":" kernelDerivations} \
--set JUPYTER_PATH "${lib.concatStringsSep ":" kernelDerivations}" \
--set JUPYTER_CONFIG_DIR "${jupyterDir}/config" \
--set JUPYTER_DATA_DIR ".jupyter/data" \
--set IPYTHONDIR "/path-not-set" \
Expand Down
25 changes: 14 additions & 11 deletions lib/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@ pkgs: let
});
};

# A fix is on the way soon, https://github.com/nix-community/poetry2nix/pull/787
preOverlay = final: prev: {
babel = null;
Babel = null;
babel_ = prev.babel.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [final.setuptools];
});
y-py = prev.y-py.override {
preferWheel = true;
};
};

postOverlay = final: prev:
{}
// {
babel = prev.babel_;
Babel = prev.babel_;
testbook = prev.testbook.overridePythonAttrs (old: {
postPatch = ''
mkdir ./tmp
Expand All @@ -31,6 +26,14 @@ pkgs: let
rm -rf tmp
'';
});
};
in
(pkgs.poetry2nix.defaultPoetryOverrides.overrideOverlay preOverlay).extend postOverlay
}
// addNativeBuildInputs prev "rfc3986-validator" [final.setuptools final.pytest-runner]
// addNativeBuildInputs prev "jupyter-server-terminals" [final.hatchling]
// addNativeBuildInputs prev "jupyter-events" [final.hatchling]
// addNativeBuildInputs prev "jupyter-server-fileid" [final.hatchling]
// addNativeBuildInputs prev "jupyter-server" [final.hatchling final.hatch-jupyter-builder]
// addNativeBuildInputs prev "jupyter-server-ydoc" [final.hatchling]
// addNativeBuildInputs prev "ypy-websocket" [final.hatchling]
// addNativeBuildInputs prev "pathspec" [final.flit-core]
// addNativeBuildInputs prev "jupyter-ydoc" [final.hatchling];
in [preOverlay pkgs.poetry2nix.defaultPoetryOverrides postOverlay]
Loading

0 comments on commit 0c03a8e

Please sign in to comment.