diff options
| author | seth <[email protected]> | 2023-11-13 00:40:23 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-11-13 05:42:06 +0000 |
| commit | d7c791c1c789ac284c504742c5a301076014e1f4 (patch) | |
| tree | 9cce76dbd9257eacee9e0a8c4cd006bfb4bb6348 /flake.nix | |
| parent | 4e5074dc8275ad53eacab66bdb89b68e79196b5f (diff) | |
ci: add release gate for garnix
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -24,13 +24,36 @@ forAllSystems = fn: lib.genAttrs systems (sys: fn nixpkgs.legacyPackages.${sys}); in { + checks = forAllSystems (pkgs: { + ciGate = let + inherit (pkgs) system; + pkgs' = self.packages.${system}; + requirements = { + # all packages on linux are built + "x86_64-linux" = lib.mapAttrsToList (_: v: v.pname or v.name) pkgs'; + "aarch64-linux" = requirements."x86_64-linux"; + + # but not for macos + "aarch64-darwin" = ["modrinth-app"]; + + # garnix also doesn't support intel macs :( + "x86_64-darwin" = []; + }; + in + pkgs.runCommand "ci-gate" { + nativeBuildInputs = + builtins.filter (v: builtins.elem (v.pname or v.name) requirements.${system}) + (builtins.attrValues pkgs'); + } "touch $out"; + }); + packages = forAllSystems ( pkgs: let overlay = lib.fix (final: self.overlays.default final pkgs); /* this filters out packages that may be broken or not supported - on the current system. packages that have no `version` or `platforms` + on the current system. packages that have no `broken` or `platforms` meta attribute are assumed to be valid */ isValid = _: v: |
