33 lines
798 B
Nix
33 lines
798 B
Nix
{
|
|
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;
|
|
});
|
|
}
|