Created
December 13, 2019 15:45
-
-
Save rizary/6ff15ffecae1bc48d508bba13119e761 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { 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