2019-04-04 11:33:38 +03:00
|
|
|
# This file defines the GHC along with any overrides that is used for the
|
|
|
|
# nix builds and stack builds.
|
|
|
|
|
|
|
|
{ system ? builtins.currentSystem
|
|
|
|
, pkgs ? import ./nixpkgs.nix { inherit system; }
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
hsLib = pkgs.haskell.lib;
|
|
|
|
|
|
|
|
hsOverrides = with pkgs.haskell.lib; with pkgs.lib; (self: super:
|
|
|
|
rec {
|
|
|
|
# Override the default mkDerivation.
|
|
|
|
# NOTE: Changing this in any way will cause a full rebuild of every package!
|
|
|
|
mkDerivation = args: super.mkDerivation (args // {
|
|
|
|
enableLibraryProfiling = args.enableLibraryProfiling or true;
|
|
|
|
doCheck = args.doCheck or false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2019-04-25 18:22:38 +03:00
|
|
|
ghc = pkgs.callPackage ./overrides/ghc-8.6.5.nix rec {
|
2020-05-11 12:47:54 +03:00
|
|
|
bootPkgs = pkgs.haskell.packages.ghc865Binary;
|
2019-04-04 11:33:38 +03:00
|
|
|
inherit (pkgs.python3Packages) sphinx;
|
|
|
|
inherit (pkgs) buildLlvmPackages;
|
|
|
|
enableIntegerSimple = true;
|
2020-02-26 22:00:07 +03:00
|
|
|
enableShared = false;
|
2019-04-04 11:33:38 +03:00
|
|
|
enableRelocatedStaticLibs = true;
|
2019-08-30 13:47:07 +03:00
|
|
|
libffi = null;
|
2019-04-04 11:33:38 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
packages = pkgs.callPackage "${toString pkgs.path}/pkgs/development/haskell-modules" {
|
|
|
|
haskellLib = pkgs.haskell.lib;
|
|
|
|
inherit ghc;
|
|
|
|
buildHaskellPackages = packages;
|
|
|
|
compilerConfig = pkgs.callPackage "${toString pkgs.path}/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix" { haskellLib = pkgs.haskell.lib; };
|
|
|
|
overrides = hsOverrides;
|
|
|
|
};
|
|
|
|
|
|
|
|
in packages
|