Skip to content

Instantly share code, notes, and snippets.

@mpickering
Created January 5, 2018 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpickering/209354a6affe2883ca07ffc4f4084af6 to your computer and use it in GitHub Desktop.
Save mpickering/209354a6affe2883ca07ffc4f4084af6 to your computer and use it in GitHub Desktop.
Final script from "Using a development version of GHC with nix"
let
nixpkgs = import <nixpkgs> {};
patchRepo =
nixpkgs.fetchFromGitHub {
owner = "mpickering";
repo = "head.hackage";
rev = "767dcf11b367ccff4a9fcd55df9c2432cd485fbe";
sha256 = "1cdrcw7grpc2dyxnb7a5bg9mi1h7qnblcibi91s348034zf7a0vj";};
patchDir = "${patchRepo}/patches";
patchScript = "${patchRepo}/scripts/overrides.nix";
in
self: super:
{
patches = super.callPackage patchScript
{ patches = patchDir; };
new-ghcHEAD =
let ghcPackageOverrides = super.callPackage self.patches {};
localOverrides =
sel: sup: { haskell-src-exts
= sel.callHackage "haskell-src-exts" "1.20.1" {};
mkDerivation
= drv: sup.mkDerivation (drv //
{ jailbreak = true; doHaddock = false;});
};
in super.haskell.packages.ghcHEAD.extend
(self.lib.composeExtensions localOverrides ghcPackageOverrides);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment