{ description = "Jupyter server with dependencies for mailstats"; inputs = { # lib nixpkgs.url = github:nixos/nixpkgs; flake-utils.url = github:numtide/flake-utils; # deps jupyterWith.url = github:tweag/jupyterwith; }; outputs = { self, nixpkgs, flake-utils, jupyterWith }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = nixpkgs.lib.attrValues jupyterWith.overlays; }; jupyterEnv = pkgs.jupyterlabWith { kernels = [ ipython ]; }; ipython = pkgs.kernels.iPythonWith { name = "Python"; packages = p: with p; [ imapclient numpy matplotlib ]; ignoreCollisions = true; }; in rec { apps.default = apps.jupyterlab; apps.jupyterlab = { type = "app"; program = "${jupyterEnv}/bin/jupyter-lab"; }; } ); }