Last active
June 14, 2019 05:49
-
-
Save puffnfresh/903b399d1e3ace6bf7258917def96d9b to your computer and use it in GitHub Desktop.
ghc not found patch for haskell.nix
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) { inherit pkgs; }; | |
happyHack = config: | |
let inherit (config.hsPkgs) happy; | |
in "export happy_datadir=${happy.components.exes.happy}/share/${builtins.currentSystem}-ghc-${config.compiler.version}/${happy.identifier.name}-${happy.identifier.version}"; | |
pkgSet = haskell.mkCabalProjectPkgSet { | |
plan-pkgs = import ./pkgs.nix; | |
modules = [ | |
({ config, ... }: | |
{ packages.haskell-src.preBuild = happyHack config; | |
packages.pretty-show.preBuild = happyHack config; | |
nonReinstallablePkgs = [ "ghc" "ghc-boot" "ghci" "binary" "bytestring" "containers" "directory" "filepath" "hpc" "process" "time" "terminfo" "transformers" "unix" ]; | |
}) | |
]; | |
}; | |
in | |
pkgSet.config.hsPkgs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment