Skip to content

Instantly share code, notes, and snippets.

@nmattia
Created February 1, 2018 10:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nmattia/172b63f5a59da5383ce82b94cff73388 to your computer and use it in GitHub Desktop.
Save nmattia/172b63f5a59da5383ce82b94cff73388 to your computer and use it in GitHub Desktop.
IHaskell and R nix shell file
let
# Use pinned packages
_nixpkgs = import <nixpkgs> {};
nixpkgs = _nixpkgs.fetchFromGitHub
({
owner = "nmattia";
repo = "nixpkgs";
rev = "02359c639193103812f7356564326556cbb41ca4";
sha256= "1rg0czkxqynycw23v0dmk0vd2v17d6v3yr06bg23wqwpm3b5z0nd";
});
# Create a package set with some overlays
pkgs = import nixpkgs
{
overlays =
[
(self: super:
{
haskellPackages = super.haskellPackages.override
{
overrides = haskellSelf: haskellSuper:
# shelly is broken
# (somewhat related issue:
# https://github.com/NixOS/nixpkgs/issues/33113)
{ shelly = pkgs.haskell.lib.dontCheck haskellSuper.shelly;
};
};
})
];
# Make some packages available to IHaskell
config =
{ ihaskell =
{ packages = ps:
[
ps.compact
ps.ihaskell-inline-r
ps.ihaskell-diagrams
ps.ihaskell-charts
ps.lens
ps.lens-aeson
ps.vector
ps.vector-fftw
ps.wreq
];
};
};
};
in pkgs.stdenv.mkDerivation
{
name = "my-jupyter";
src = null;
buildInputs =
[ pkgs.ihaskell
pkgs.R
];
}
@AleXoundOS
Copy link

AleXoundOS commented Jul 12, 2023

Can you, please, add in comments some example Haskell & R code, which can be used with this environment?

@nmattia
Copy link
Author

nmattia commented Jul 13, 2023

hi @AleXoundOS, I haven't used Haskell & R in years unfortunately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment