Skip to content

Commit 0f5ae91

Browse files
committed
bash-notebook: install kernel successfully
1 parent d1da0c5 commit 0f5ae91

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

bash-notebook/default.nix

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ let
2323
};
2424
bashSh = pkgs.writeScriptBin "bash-notebook" ''
2525
#! ${pkgs.stdenv.shell}
26-
export PATH="${pkgs.stdenv.lib.makeBinPath [ jupyter bash_kernel ]}"
26+
export PATH="${pkgs.stdenv.lib.makeBinPath [ jupyter bash_kernel pkgs.bash ]}"
2727
${pkgs.python3.interpreter} -m bash_kernel.install && ${jupyter}/bin/jupyter notebook
2828
'';
29+
bash-notebook = pkgs.runCommand "bash-notebook" {} ''
30+
mkdir -p $out/bin
31+
ln -s ${bashSh}/bin/bash-notebook $out/bin/bash-notebook
32+
'';
2933
in
3034
pkgs.buildEnv {
3135
name = "bash-notebook-env";
32-
paths = [ jupyter bash_kernel ];
36+
buildInputs = [ pkgs.makeWrapper ];
37+
paths = [ jupyter bash_kernel bash-notebook ];
3338
postBuild = ''
34-
. "${pkgs.makeWrapper}/nix-support/setup-hook"
35-
ln -s ${bashSh}/bin/bash-notebook $out/bin/.
3639
for prg in $out/bin"/"*;do
3740
wrapProgram $prg --set PYTHONPATH "$(echo ${jupyter}/lib/*/site-packages)"
3841
done

0 commit comments

Comments
 (0)