diff options
Diffstat (limited to 'nix/ci.nix')
| -rw-r--r-- | nix/ci.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nix/ci.nix b/nix/ci.nix new file mode 100644 index 0000000..38293ce --- /dev/null +++ b/nix/ci.nix @@ -0,0 +1,25 @@ +{ + perSystem = { + pkgs, + lib, + config, + ... + }: { + /* + 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 (builtins.attrValues s)) [ + config.checks + config.devShells + (builtins.removeAttrs config.packages ["default" "ciGate"]) + ] + } + ''; + }; +} |
