2019-08-31 19:15:17 +02:00
|
|
|
{ nixpkgs ? import ./nixpkgs.nix {}, compiler ? "ghc865", withHoogle ? true }:
|
2019-08-25 19:28:10 +02:00
|
|
|
let
|
|
|
|
inherit (nixpkgs) pkgs;
|
|
|
|
|
2019-08-31 19:15:17 +02:00
|
|
|
pkg = import ./pkg.nix { inherit nixpkgs; };
|
2019-08-25 19:28:10 +02:00
|
|
|
|
|
|
|
packageSet = (
|
|
|
|
if compiler == "default"
|
|
|
|
then pkgs.haskellPackages
|
|
|
|
else pkgs.haskell.packages.${compiler}
|
2019-11-30 04:57:58 +01:00
|
|
|
).override {
|
|
|
|
overrides = import ./haskell-overlay.nix { inherit nixpkgs; };
|
|
|
|
};
|
2019-08-25 19:28:10 +02:00
|
|
|
|
|
|
|
haskellPackages = (
|
|
|
|
if withHoogle
|
|
|
|
then packageSet.override {
|
|
|
|
overrides = (self: super: {
|
|
|
|
ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
|
|
|
|
ghcWithPackages = self.ghc.withPackages;
|
2019-12-30 17:31:56 +01:00
|
|
|
} // (import ./haskell-overlay.nix { inherit nixpkgs; }) self super);
|
2019-08-25 19:28:10 +02:00
|
|
|
}
|
|
|
|
else packageSet
|
|
|
|
);
|
|
|
|
|
2019-08-31 19:15:17 +02:00
|
|
|
drv = haskellPackages.callPackage pkg {};
|
2019-08-25 19:28:10 +02:00
|
|
|
|
|
|
|
inherit (pkgs.haskell.lib) addBuildTools;
|
|
|
|
in
|
2020-06-22 00:01:29 +02:00
|
|
|
(addBuildTools drv (with haskellPackages; [
|
|
|
|
cabal-install
|
|
|
|
ghc-prof-flamegraph
|
2020-06-22 02:11:03 +02:00
|
|
|
hp2pretty
|
2020-06-22 00:01:29 +02:00
|
|
|
])).env
|