-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
36 lines (30 loc) · 906 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
{ nixpkgs ? import ./nix/nixpkgs.nix {}
, compiler ? "ghc883"
, doBenchmark ? true
}:
let
inherit (nixpkgs) pkgs;
baseHaskellPackages =
if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
readDirectory = import ./nix/readDirectory.nix;
haskellPackages =
let
manualOverrides = haskellPackagesNew: haskellPackagesOld: {
# Add manual overrides.
# Example:
# Diff = pkgs.haskell.lib.dontCheck haskellPackagesOld.Diff;
};
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 "rbst" ./. {}
)
)