summaryrefslogtreecommitdiff
path: root/nix/ci.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-16 00:34:10 -0500
committerseth <[email protected]>2023-12-16 11:29:01 -0500
commit51c97f77ae11d4eb8e5c38a9f5d0b5ca9d8e3da4 (patch)
tree7a7e32f0ff01549252fb205886c602f919c8b211 /nix/ci.nix
parentbd2966db8f3660c03039a0f6ab03e850f0e17d45 (diff)
ci: back to garnix
Diffstat (limited to 'nix/ci.nix')
-rw-r--r--nix/ci.nix25
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"])
+ ]
+ }
+ '';
+ };
+}