ihaskell-docker/default.nix

61 lines
1.5 KiB
Nix

let
sources = import ./nix/sources.nix;
jupyterOverlays = [
(import "${sources.jupyterWith}/nix/haskell-overlay.nix")
(import "${sources.jupyterWith}/nix/python-overlay.nix")
];
in
{ pkgs ? import sources.nixpkgs { }
, pkgsLinux ? import sources.nixpkgs { system = "x86_64-linux"; overlays = jupyterOverlays; }
}:
let
jupyter = import sources.jupyterWith { pkgs = pkgsLinux; };
jupyterEnv = jupyter.jupyterlabWith {
kernels = [
(jupyter.kernels.iPythonWith {
name = "python";
packages = p: [];
})
(jupyter.kernels.iHaskellWith {
name = "haskell";
packages = p: with p; [
hvega formatting
ihaskell-charts
ihaskell-diagrams
ihaskell-gnuplot
ihaskell-graphviz
ihaskell-hvega
ihaskell-juicypixels
ihaskell-magic
ihaskell-plot
hmatrix
cassava
attoparsec
];
})
];
};
in
pkgs.dockerTools.buildImage {
name = "pbri/jup";
tag = "1.3";
contents = [
pkgsLinux.graphviz
];
config = {
Env = [ "HOME=/data"];
Cmd = [
"${jupyterEnv}/bin/jupyter-lab"
"--notebook-dir=/notebooks"
"--ip=0.0.0.0"
"--no-browser"
# No authentication, has to be handled by reverse proxy!
"--ServerApp.token="
"--ServerApp.password="
"--collaborative"
];
WorkingDir = "/Notebooks";
};
}