Skip to content

Instantly share code, notes, and snippets.

@rizary
Created December 13, 2019 15:45
Show Gist options
  • Select an option

  • Save rizary/6ff15ffecae1bc48d508bba13119e761 to your computer and use it in GitHub Desktop.

Select an option

Save rizary/6ff15ffecae1bc48d508bba13119e761 to your computer and use it in GitHub Desktop.
{ jupyterWith
, haskellPackages
, haskellPkg ? (_: [])
, pythonPkg ? (_: [])
, pythonOverridesList ? []
}:
let
jupyterSrc = jupyterWith + "/nix";
inherit (import jupyterSrc {}) pkgs lib;
jupyterPython3 = (import jupyterSrc {}).python3;
jupyter = import jupyterWith { };
# iPython
#
# Uncomment this attributes for adding iPython and its package
# into existing jupyter notebook
#
iPython =jupyter.kernels.iPythonWith {
#python3 =
# jupyterPython3.override (old: with lib; {
# packageOverrides =
# foldr composeExtensions old.packageOverrides
# pythonOverridesList;
# });
name = "iPython";
packages = pythonPkg;
# [ numpy
# matplotlib
# pandas
# seaborn
# scikitlearn
# scipy
# ];
};
# iHaskell
#
# all haskell package contained in iHaskell will always the same
# as packages used by obelisk.
#
# all haskellPackages
iHaskellWithPackages = jupyter.kernels.iHaskellWith {
inherit haskellPackages;
name = "iHaskell";
packages = haskellPkg;
};
in {
# Jupyter Lab and Kernels
jupyterLabWithKernels =
jupyter.jupyterlabWith {
kernels =
[
iHaskellWithPackages
iPython
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment