Last active
August 24, 2021 18:31
-
-
Save fusetim/39073f5db3bd198f13ef60172fcf9b51 to your computer and use it in GitHub Desktop.
Bash kernel for JupyterWith and Nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ name ? "nixpkgs", packages ? [] }: | |
let | |
pkgs = import <nixpkgs> {}; | |
kernelSpecFile = pkgs.writeText "kernel.json" (builtins.toJSON { | |
displayName = "Bash"; | |
argv = ["${pkgs.python3.interpreter}" "-m" "bash_kernel" "-f" "{connection_file}"]; | |
language = "Bash"; | |
}); | |
BashKernel = pkgs.python3Packages.bash_kernel; | |
in | |
{ | |
spec = BashKernel; | |
runtimePackages = packages pkgs ++ BashKernel.propagatedBuildInputs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment