Revert change to default.nix

This commit is contained in:
Doug Beardsley 2018-04-06 17:23:24 -06:00 committed by John Wiegley
parent 3d98bc8e05
commit f1ef9440e0
1 changed files with 34 additions and 3 deletions

View File

@ -1,7 +1,32 @@
{ pkgs ? import <nixpkgs> {} }: pkgs.haskellPackages.developPackage {
let
hostPkgs = import <nixpkgs> {};
pinnedPkgs = hostPkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs-channels";
rev = "ee28e35ba37ab285fc29e4a09f26235ffe4123e2";
sha256 = "0a6xrqjj2ihkz1bizhy5r843n38xgimzw5s2mfc42kk2rgc95gw5";
};
in { nixpkgs ? import pinnedPkgs {}
, compiler ? "ghc822"
, doProfiling ? false
, doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
haskellPackages = let hpkgs = pkgs.haskell.packages.${compiler}; in
hpkgs // {
mkDerivation = args: hpkgs.mkDerivation (args // {
enableLibraryProfiling = doProfiling;
enableExecutableProfiling = doProfiling;
});
};
pkg = haskellPackages.developPackage {
root = ./.;
source-overrides = {
unordered-containers = "0.2.9.0";
# Use a particular commit from github
insert-ordered-containers = pkgs.fetchFromGitHub {
owner = "mightybyte";
@ -10,4 +35,10 @@
sha256 = "0l0g6ns5bcrcaij0wbdgc04qyl9h0vk1kx9lkzdkwj9v51l26azm";
};
};
}
};
variant = if doBenchmark
then pkgs.haskell.lib.doBenchmark
else pkgs.lib.id;
in variant pkg