|
7 | 7 | treefmt-nix.url = "github:Platonic-Systems/treefmt-nix/flake-module"; # https://github.com/numtide/treefmt-nix/pull/14
|
8 | 8 | flake-root.url = "github:srid/flake-root";
|
9 | 9 | mission-control.url = "github:Platonic-Systems/mission-control";
|
| 10 | + |
| 11 | + # CI |
| 12 | + hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects"; |
10 | 13 | };
|
11 | 14 |
|
12 | 15 | outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
13 |
| - flake-parts.lib.mkFlake { inherit inputs; } { |
| 16 | + flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, ... }: { |
14 | 17 | systems = nixpkgs.lib.systems.flakeExposed;
|
15 | 18 | imports = [
|
16 | 19 | inputs.haskell-flake.flakeModule
|
17 | 20 | inputs.treefmt-nix.flakeModule
|
18 | 21 | inputs.flake-root.flakeModule
|
19 | 22 | inputs.mission-control.flakeModule
|
| 23 | + |
| 24 | + # CI |
| 25 | + inputs.hercules-ci-effects.flakeModule |
20 | 26 | ];
|
21 | 27 | perSystem = { self', lib, config, pkgs, ... }: {
|
22 | 28 | # The "main" project. You can have multiple projects, but this template
|
|
93 | 99 |
|
94 | 100 | # checks.hlsCheck = config.haskellProjects.main.hlsCheck.drv;
|
95 | 101 | };
|
96 |
| - flake.herculesCI.ciSystems = [ "x86_64-linux" "aarch64-darwin" ]; |
97 |
| - }; |
| 102 | + |
| 103 | + # CI configuration |
| 104 | + flake = { |
| 105 | + herculesCI.ciSystems = [ "x86_64-linux" "aarch64-darwin" ]; |
| 106 | + effects = { branch, ... }: withSystem "x86_64-linux" ( |
| 107 | + { config, effectgs, pkgs, ... }: { |
| 108 | + hlsCheck = config.haskellProjects.main.hlsCheck.drv; |
| 109 | + } |
| 110 | + ); |
| 111 | + }; |
| 112 | + }); |
98 | 113 | }
|
0 commit comments