-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
39 lines (33 loc) · 999 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ sources ? import ./nix/sources.nix
, nixpkgs ? import sources.nixpkgs {
overlays = [ ];
config = { };
}
, compiler ? "ghc964"
, doBenchmark ? false
}:
let
inherit (nixpkgs) pkgs;
baseHaskellPackages =
if compiler == "default" then
pkgs.haskellPackages
else
pkgs.haskell.packages.${compiler};
gitignoreSource = (import (sources."gitignore.nix") { }).gitignoreSource;
readDirectory = import ./nix/readDirectory.nix;
haskellPackages =
let
manualOverrides = haskellPackagesNew: haskellPackagesOld:
{
# Add manual overrides here
};
in
baseHaskellPackages.override {
overrides =
pkgs.lib.composeExtensions (readDirectory ./nix/sources) manualOverrides;
};
doBench = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
doStatic = pkgs.haskell.lib.justStaticExecutables;
in
doStatic
(doBench (haskellPackages.callCabal2nix "free-monads-by-example" (gitignoreSource ./.) { }))