2020-06-29 03:27:02 +02:00
|
|
|
{ nixpkgs ? import ./nixpkgs.nix {}
|
|
|
|
, pkgs ? nixpkgs.pkgs
|
|
|
|
, compiler ? "ghc865"
|
|
|
|
, withHoogle ? true
|
|
|
|
}:
|
2019-08-25 19:28:10 +02:00
|
|
|
let
|
2020-06-29 03:27:02 +02:00
|
|
|
pkg = import ./pkg.nix { inherit pkgs; };
|
2019-08-25 19:28:10 +02:00
|
|
|
|
|
|
|
packageSet = (
|
|
|
|
if compiler == "default"
|
|
|
|
then pkgs.haskellPackages
|
|
|
|
else pkgs.haskell.packages.${compiler}
|
2020-06-29 03:27:02 +02:00
|
|
|
);
|
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;
|
2020-06-29 03:27:02 +02:00
|
|
|
} // (import ../../../third_party/haskell_overlay { inherit pkgs; })
|
|
|
|
self super);
|
2019-08-25 19:28:10 +02:00
|
|
|
}
|
|
|
|
else packageSet
|
|
|
|
);
|
|
|
|
|
2020-06-29 01:35:41 +02:00
|
|
|
drv = pkgs.haskell.lib.doBenchmark (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
|