summaryrefslogtreecommitdiff
path: root/nix/ci.nix
blob: 682f46ffab382a76d7321054c5b7692063120352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  perSystem = {
    pkgs,
    lib,
    self',
    ...
  }: {
    /*
    require packages, checks, and devShells for ci to be considered a success

    also thanks DetSys for showing me i don't need to use runCommand, symlinkJoin, or linkFarm!
    https://determinate.systems/posts/hydra-deployment-source-of-truth
    */

    packages.ciGate = pkgs.writeText "ci-gate" (
      lib.concatMapStringsSep "\n" (s: toString (lib.attrValues s)) [
        self'.checks
        self'.devShells
        (builtins.removeAttrs self'.packages ["default" "ciGate"])
      ]
    );
  };
}