-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
default.nix
28 lines (27 loc) · 1.15 KB
/
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
{ compiler ? "ghc884", check ? false, nixpkgs ? <nixpkgs> }:
let
config = {
packageOverrides = pkgs: with pkgs.haskell.lib; {
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
${compiler} = pkgs.haskell.packages.${compiler}.override {
overrides = self: super: with pkgs.haskell.lib; rec {
stripe-core = disableOptimization (self.callCabal2nix "stripe-core" ./stripe-core {});
stripe-tests = disableOptimization (self.callCabal2nix "stripe-tests" ./stripe-tests {});
stripe-http-client =
let
pkg = disableOptimization (self.callCabal2nix "stripe-http-client" ./stripe-http-client {});
in if check
then pkg
else dontCheck pkg;
stripe-haskell = disableOptimization (self.callCabal2nix "stripe-haskell" ./stripe-haskell {});
};
};
};
};
};
};
in
with (import nixpkgs { inherit config; }).haskell.packages.${compiler}; {
inherit stripe-core stripe-tests stripe-haskell stripe-http-client;
}