|
3 | 3 | let
|
4 | 4 | inherit (pkgs.lib) fold composeExtensions concatMap attrValues;
|
5 | 5 |
|
6 |
| - combineOverrides = old: |
7 |
| - fold composeExtensions (old.overrides or (_: _: { })); |
| 6 | + combineOverrides = old: fold composeExtensions (old.overrides or (_: _: { })); |
8 | 7 |
|
9 |
| - makeTestConfiguration = { ghc ? pkgs.haskellPackages, overrides ? new: old: { } }: |
10 |
| - let |
11 |
| - inherit (pkgs.haskell.lib) dontCheck packageSourceOverrides; |
12 |
| - in |
13 |
| - (ghc.override (old: { |
14 |
| - overrides = |
15 |
| - combineOverrides old [ |
16 |
| - (packageSourceOverrides { monads-tf = ../monads-tf; }) |
17 |
| - overrides |
18 |
| - ]; |
19 |
| - })).monads-tf; |
20 |
| - testConfigurations = |
21 |
| - rec { |
22 |
| - ghc-9-2 = makeTestConfiguration { |
23 |
| - ghc = pkgs.haskell.packages.ghc92; |
24 |
| - }; |
25 |
| - ghc-9-4 = makeTestConfiguration { |
26 |
| - ghc = pkgs.haskell.packages.ghc94; |
27 |
| - }; |
28 |
| - ghc-9-6 = makeTestConfiguration { |
29 |
| - ghc = pkgs.haskell.packages.ghc96; |
30 |
| - overrides = new: old: { |
| 8 | + makeTestConfiguration = |
| 9 | + { ghc ? pkgs.haskellPackages, overrides ? new: old: { } }: |
| 10 | + let inherit (pkgs.haskell.lib) dontCheck packageSourceOverrides; |
| 11 | + in (ghc.override (old: { |
| 12 | + overrides = combineOverrides old [ |
| 13 | + (packageSourceOverrides { monads-tf = ../monads-tf; }) |
| 14 | + overrides |
| 15 | + ]; |
| 16 | + })).monads-tf; |
| 17 | + testConfigurations = rec { |
| 18 | + ghc-9-2 = makeTestConfiguration { ghc = pkgs.haskell.packages.ghc92; }; |
| 19 | + ghc-9-4 = makeTestConfiguration { ghc = pkgs.haskell.packages.ghc94; }; |
| 20 | + ghc-9-6 = makeTestConfiguration { |
| 21 | + ghc = pkgs.haskell.packages.ghc96; |
| 22 | + overrides = new: old: |
| 23 | + { |
31 | 24 | # transformers = new.callHackage "transformers" "0.5.6.2" { };
|
32 | 25 | };
|
33 |
| - }; |
34 |
| - all = pkgs.symlinkJoin { |
35 |
| - name = "monads-tf-tests"; |
36 |
| - paths = [ ghc-9-2 ghc-9-4 ghc-9-6 ]; |
37 |
| - }; |
38 | 26 | };
|
| 27 | + all = pkgs.symlinkJoin { |
| 28 | + name = "monads-tf-tests"; |
| 29 | + paths = [ ghc-9-2 ghc-9-4 ghc-9-6 ]; |
| 30 | + }; |
| 31 | + }; |
39 | 32 |
|
40 |
| -in |
41 |
| -{ |
| 33 | +in { |
42 | 34 |
|
43 | 35 | packages = { inherit testConfigurations; };
|
44 | 36 |
|
45 | 37 | devShells.default = pkgs.mkShell {
|
46 |
| - inputsFrom = [ (makeTestConfiguration {}).env ]; |
| 38 | + inputsFrom = [ (makeTestConfiguration { }).env ]; |
47 | 39 | buildInputs = [ pkgs.haskell-language-server pkgs.cabal-install ];
|
48 | 40 | };
|
49 | 41 |
|
|
0 commit comments