templates/flakes/jupyter/flake.nix

34 lines
798 B
Nix
Raw Normal View History

2022-09-08 17:53:22 +03:00
{
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;
});
}