aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-05-06 22:54:18 -0600
committerQyriad <qyriad@qyriad.me>2024-05-07 12:38:01 -0600
commitaac32327d5d974cf03fee622558210a37bcdd0e6 (patch)
tree47e9c349816f51273db14ddceaa3cbe34a511dd9
parent4f98d21b71d02c09cab9df9778fcc03df4bcbd4e (diff)
flake: fix eval of checks & devshell on i686-linux
Change-Id: I62da3161327051005e3f48f83974140efef4417e
-rw-r--r--flake.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index 6594961ff..3dc9b3ac3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -96,6 +96,10 @@
];
forAllSystems = lib.genAttrs systems;
+ # Same as forAllSystems, but removes nulls, in case something is broken
+ # on that system.
+ forAvailableSystems =
+ f: lib.filterAttrs (name: value: value != null && value != { }) (forAllSystems f);
forAllCrossSystems = lib.genAttrs crossSystems;
@@ -282,18 +286,21 @@
);
};
- pre-commit = forAllSystems (
+ pre-commit = forAvailableSystems (
system:
let
pkgs = nixpkgsFor.${system}.native;
+ pre-commit-check = import ./misc/pre-commit.nix { inherit self pkgs pre-commit-hooks; };
+ # dotnet-sdk_6, a nativeBuildInputs of pre-commit, is broken on i686-linux.
+ available = lib.meta.availableOn { inherit system; } pkgs.dotnet-sdk_6;
in
- import ./misc/pre-commit.nix { inherit self pkgs pre-commit-hooks; }
+ lib.optionalAttrs available pre-commit-check
);
};
# NOTE *do not* add fresh derivations to checks, always add them to
# hydraJobs first (so CI will pick them up) and only link them here
- checks = forAllSystems (
+ checks = forAvailableSystems (
system:
{
binaryTarball = self.hydraJobs.binaryTarball.${system};
@@ -301,6 +308,7 @@
nixpkgsLibTests = self.hydraJobs.tests.nixpkgsLibTests.${system};
rl-next = self.hydraJobs.rl-next.${system}.user;
rl-next-dev = self.hydraJobs.rl-next.${system}.dev;
+ # Will be empty attr set on i686-linux, and filtered out by forAvailableSystems.
pre-commit = self.hydraJobs.pre-commit.${system};
}
// (lib.optionalAttrs (builtins.elem system linux64BitSystems)) {