Skip to content

Commit ca7bf00

Browse files
committed
Fix shell
1 parent 1cc8a24 commit ca7bf00

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

setup.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ let
3232
# Packages that must override their respective nixpkgs versions
3333
override = [
3434
"docutils"
35+
"jupytext"
3536
"robotframework"
3637
"robotframework-seleniumlibrary"
3738
"selenium"
@@ -63,7 +64,11 @@ let
6364
}
6465
//
6566
# Change format when package could be overriden with wheel distribution
66-
optionalAttrs (hasSuffix "whl" "${pkg.src}") { format = "wheel"; }));
67+
optionalAttrs (hasSuffix "whl" "${pkg.src}") {
68+
format = "wheel";
69+
patchPhase = "";
70+
postPatch = "";
71+
}));
6772
})
6873
(filter (x: (hasAttr x pythonPackages) && (elem x override)) requirementsNames)
6974
))

shell.nix

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ let self = rec {
77

88
# python packages
99

10-
pythonPackages = (import ./setup.nix {
10+
python = (import ./setup.nix {
1111
inherit pkgs;
1212
pythonPackages = pkgs.python3Packages;
13-
}).targetPython.pkgs;
13+
}).targetPython;
14+
15+
pythonPackages = python.pkgs;
1416

1517
sikulilibrary = (import ./pkgs/sikulixlibrary {
1618
inherit pkgs pythonPackages;
@@ -104,21 +106,21 @@ let self = rec {
104106
mkdir -p $out/share/jupyter/jupyter_notebook_config.d
105107
106108
ln -s ${jupyter_nbconfig} $out/share/jupyter/nbconfig
107-
ln -s ${jupyter-contrib-nbextensions}/${pythonPackages.python.sitePackages}/jupyter-contrib-nbextensions/nbextensions/* $out/share/jupyter/nbextensions
108-
ln -s ${rise}/${pythonPackages.python.sitePackages}/rise/static $out/share/jupyter/nbextensions/rise
109+
ln -s ${jupyter-contrib-nbextensions}/${python.sitePackages}/jupyter-contrib-nbextensions/nbextensions/* $out/share/jupyter/nbextensions
110+
ln -s ${rise}/${python.sitePackages}/rise/static $out/share/jupyter/nbextensions/rise
109111
ln -s ${vim_binding} $out/share/jupyter/nbextensions/vim_binding
110112
ln -s ${widgetsnbextension}/share/jupyter/nbextensions/* $out/share/jupyter/nbextensions
111113
112-
${pythonPackages.python.withPackages (ps: with ps; [ robotkernel ])}/bin/python -m robotkernel.install --prefix=$out
113-
cp -R ${pythonPackages.python.withPackages (ps: with ps; [ robotkernel ])}/etc/jupyter/jupyter_notebook_config.d/* $out/share/jupyter/jupyter_notebook_config.d
114+
${python.withPackages (ps: with ps; [ robotkernel ])}/bin/python -m robotkernel.install --prefix=$out
115+
cp -R ${python.withPackages (ps: with ps; [ robotkernel ])}/etc/jupyter/jupyter_notebook_config.d/* $out/share/jupyter/jupyter_notebook_config.d
114116
115117
JUPYTER_CONFIG_DIR=$out/share/jupyter \
116-
PATH=${pythonPackages.python.withPackages (ps: with ps; [ jupyter-starters ])}/bin \
117-
${pythonPackages.python.withPackages (ps: with ps; [ jupyter-starters ])}/bin/jupyter serverextension enable --py jupyter_starters
118+
PATH=${python.withPackages (ps: with ps; [ jupyter-starters ])}/bin \
119+
${python.withPackages (ps: with ps; [ jupyter-starters ])}/bin/jupyter serverextension enable --py jupyter_starters
118120
119121
JUPYTER_CONFIG_DIR=$out/share/jupyter \
120-
PATH=${pythonPackages.python.withPackages (ps: with ps; [ notebook jupytext ])}/bin \
121-
${pythonPackages.python.withPackages (ps: with ps; [ notebook jupytext ])}/bin/jupyter serverextension enable jupytext
122+
PATH=${python.withPackages (ps: with ps; [ notebook jupytext ])}/bin \
123+
${python.withPackages (ps: with ps; [ notebook jupytext ])}/bin/jupyter serverextension enable jupytext
122124
123125
echo "import rise" >> $out/share/jupyter/jupyter_notebook_config.py
124126
@@ -148,8 +150,8 @@ pkgs.stdenv.mkDerivation rec {
148150
++ (with pkgs; lib.optionals sikuli [ jre8 ]);
149151
shellHook = ''
150152
mkdir -p $(pwd)/.jupyter
151-
cp -R ${jupyter_config_dir}/share/jupyter/* $(pwd)/.jupyter
152153
chmod u+w -R $(pwd)/.jupyter
154+
cp -R ${jupyter_config_dir}/share/jupyter/* $(pwd)/.jupyter
153155
export JUPYTER_CONFIG_DIR=$(pwd)/.jupyter
154156
export JUPYTER_PATH=$(pwd)/.jupyter
155157
export JUPYTER_DATA_DIR=$(pwd)/.jupyter

0 commit comments

Comments
 (0)