add flake-jupyter

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-08 17:53:22 +03:00
parent 7984d011fb
commit d9db6faf24
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 37 additions and 0 deletions

View file

@ -12,6 +12,10 @@
path = ./flakes/rust; path = ./flakes/rust;
description = "Flake to develop, build and run a rust application"; description = "Flake to develop, build and run a rust application";
}; };
flake-jupyter = {
path = ./flakes/jupyter;
description = "Flake to configure jupyter lab";
};
# starters # starters
starter-typescript = { starter-typescript = {
path = ./starters/typescript; path = ./starters/typescript;

33
flakes/jupyter/flake.nix Normal file
View file

@ -0,0 +1,33 @@
{
inputs = {
jupyterWith.url = "github:tweag/jupyterWith";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, jupyterWith, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = builtins.attrValues jupyterWith.overlays;
};
# Source https://github.com/tweag/jupyterWith
iPython = pkgs.kernels.iPythonWith {
name = "python";
packages = p: with p; [ numpy ];
};
jupyterLab = pkgs.jupyterlabWith {
kernels = [ iPython ];
};
in
{
apps.default = {
type = "app";
program = "${jupyterLab}/bin/jupyter-lab";
};
devShell = jupyterLab.env;
});
}