Created
August 5, 2019 11:40
-
-
Save idontgetoutmuch/0f64cb7a78b852b602c5a454d0772658 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
| let | |
| jupyterLibPath = ../../..; | |
| nixpkgsPath = jupyterLibPath + "/nix"; | |
| pkgs = import nixpkgsPath {}; | |
| monadBayesSrc = pkgs.fetchFromGitHub { | |
| owner = "adscib"; | |
| repo = "monad-bayes"; | |
| rev = "647ba7cb5a98ae028600f3d828828616891b40fb"; | |
| sha256 = "1z4i03idsjnxqds3b5zk52gic2m8zflhh2v64yp11k0idxggiv2d"; | |
| }; | |
| patched-inline-r = pkgs.haskellPackages.inline-r.overrideAttrs (oldAttrs: rec { | |
| src = pkgs.fetchgit { | |
| url = git://github.com/tweag/HaskellR; | |
| rev = "8cfd6529317b9ed60b1f74b9b54485a68f21185d"; | |
| sha256 = "09cx762y4adjwbpsvdh0v9nvapvz0ay2adwrpbdrsp87ljxpdj5j"; | |
| }; | |
| postUnpack = '' | |
| sourceRoot=''${sourceRoot}/inline-r | |
| echo Source root reset to ''${sourceRoot} | |
| ''; | |
| }); | |
| patched-Naperian = pkgs.haskellPackages.Naperian.overrideAttrs (oldAttrs: rec { | |
| src = pkgs.fetchgit { | |
| url = git://github.com/idontgetoutmuch/Naperian; | |
| rev = "54d873ffe99de865ca34e6bb3b92736e29e01619"; | |
| sha256 = "1lshl6k1h2hb78nqgjal508qw2kzwfgx179r6v8wsmc7qijkpldv"; | |
| }; | |
| }); | |
| hVegaSrc = pkgs.fetchFromGitHub { | |
| owner = "DougBurke"; | |
| repo = "hvega"; | |
| rev = "56d543aef10ba31bd5f0de73d8d773d309a51960"; | |
| sha256 = "0kpy7ar0gjxwqgpq88612jl695mgr55a8lbby58wrghlwzqrznr9"; | |
| }; | |
| haskellPackages = pkgs.haskellPackages.override (old: { | |
| overrides = pkgs.lib.composeExtensions old.overrides | |
| (self: hspkgs: { | |
| inline-r = patched-inline-r; | |
| Naperian = patched-Naperian; | |
| monad-bayes = hspkgs.callCabal2nix "monad-bayes" "${monadBayesSrc}" {}; | |
| hvega = hspkgs.callCabal2nix "hvega" "${hVegaSrc}/hvega" {}; | |
| ihaskell-hvega = hspkgs.callCabal2nix "ihaskell-hvega" "${hVegaSrc}/ihaskell-hvega" {}; | |
| }); | |
| }); | |
| jupyter = import jupyterLibPath { pkgs=pkgs; }; | |
| ihaskellWithPackages = jupyter.kernels.iHaskellWith { | |
| #extraIHaskellFlags = "--debug"; | |
| haskellPackages=haskellPackages; | |
| name = "bayes-monad"; | |
| packages = p: with p; [ | |
| monad-bayes | |
| hvega | |
| statistics | |
| vector | |
| ihaskell-hvega | |
| aeson | |
| aeson-pretty | |
| formatting | |
| foldl | |
| inline-r | |
| ]; | |
| }; | |
| jupyterlabWithKernels = | |
| jupyter.jupyterlabWith { | |
| kernels = [ ihaskellWithPackages ]; | |
| directory = jupyter.mkDirectoryWith { | |
| extensions = [ | |
| "jupyterlab-ihaskell" | |
| ]; | |
| }; | |
| }; | |
| in | |
| jupyterlabWithKernels.env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment