Skip to content

Commit

Permalink
Merge pull request #18 from sepiabrown/monad-bayes-series-flake
Browse files Browse the repository at this point in the history
Add flake.nix. Use '$ nix develop'
  • Loading branch information
guaraqe authored Feb 23, 2022
2 parents 8bef90a + 1dbd25d commit 569aa17
Show file tree
Hide file tree
Showing 2 changed files with 359 additions and 0 deletions.
315 changes: 315 additions & 0 deletions monad-bayes-series/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions monad-bayes-series/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
description = "Probabilistic Programming in Haskell blog resourses";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09";
jupyterWith.url = "github:tweag/jupyterWith";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, jupyterWith, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system:
let
pkgs = import nixpkgs {
system = system;
overlays = (builtins.attrValues jupyterWith.overlays) ++ [ (import ./haskell-overlay.nix) ];
};
iHaskell = pkgs.kernels.iHaskellWith {
name = "monad-bayes-series-env";
packages = p: with p; [
monad-bayes
hmatrix
hvega
statistics
vector
ihaskell-hvega
formatting
foldl
histogram-fill
];
haskellPackages = pkgs.haskell.packages.ghc865;
extraIHaskellFlags = "--codemirror Haskell";
};
jupyterEnvironment = pkgs.jupyterlabWith {
kernels = [ iHaskell ];
};
in rec {
apps.jupyterlab = {
type = "app";
program = "${jupyterEnvironment}/bin/jupyter-lab";
};
defaultApp = apps.jupyterlab;
devShell = jupyterEnvironment.env;
}
);
}

0 comments on commit 569aa17

Please sign in to comment.