Skip to content

Instantly share code, notes, and snippets.

@deepfire
Last active March 27, 2018 13:24
Show Gist options
  • Save deepfire/501a01d9785c20b9fddae45775677304 to your computer and use it in GitHub Desktop.
Save deepfire/501a01d9785c20b9fddae45775677304 to your computer and use it in GitHub Desktop.
###
### GHC HEAD in nix-shell Nano-HOWTO
###
#
# 1. Choose GHC git REVision
# 2. Determine Nix hash (requires `nix-prefetch-scripts`) of the GHC source tree for the chosen revision:
nix-prefetch-git git://git.haskell.org/ghc.git --fetch-submodules --rev $REV
# 3. Enter nix-shell with chosen GHC (WARNING: substitute REV and HASH manually! Or do shell quoting : -)
nix-shell -p 'with (import <nixpkgs> {}); haskell.compiler.ghcHEAD.overrideAttrs (old: { src = fetchgit { url = "git://git.haskell.org/ghc.git"; rev = "$REV"; sha256 = "$HASH"; }; })'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment