nix-supports/outputs: only build packages on platforms that are available
If e.g. i686-linux is not in the list of systems and thus no attribute in `nixpkgsFor` exists (e.g. on hydra.afnix.fr), don't try to instantiate it. Change-Id: I118e2af5289ad7bd95ce7f1e6b0728afb6f0321f
This commit is contained in:
@@ -139,16 +139,6 @@ lib.fix (self: {
|
||||
# Binary package for various platforms.
|
||||
build = forAllSystems (system: self.packages.${system}.nix);
|
||||
|
||||
# Ensure support for lowdown < 3.0 doesn't regress for NixOS 25.11
|
||||
build-lowdown_2_0 = lib.genAttrs [ "aarch64-linux" ] (
|
||||
system:
|
||||
assert lib.versionOlder nixpkgsFor.${system}.native.lowdown.version "3.0.0";
|
||||
self.packages.${system}.nix.override {
|
||||
lowdown = nixpkgsFor.${system}.native.lowdown;
|
||||
lowdown-unsandboxed = nixpkgsFor.${system}.native.lowdown-unsandboxed;
|
||||
}
|
||||
);
|
||||
|
||||
buildStatic = lib.genAttrs linux64BitSystems (system: self.packages.${system}.nix-static);
|
||||
|
||||
rl-next = forAllSystems (
|
||||
@@ -208,5 +198,15 @@ lib.fix (self: {
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
}
|
||||
// lib.optionalAttrs (nixpkgsFor ? aarch64-linux) {
|
||||
build-lowdown_2_0 = lib.genAttrs [ "aarch64-linux" ] (
|
||||
system:
|
||||
assert lib.versionOlder nixpkgsFor.${system}.native.lowdown.version "3.0.0";
|
||||
self.packages.${system}.nix.override {
|
||||
lowdown = nixpkgsFor.${system}.native.lowdown;
|
||||
lowdown-unsandboxed = nixpkgsFor.${system}.native.lowdown-unsandboxed;
|
||||
}
|
||||
);
|
||||
};
|
||||
})
|
||||
|
||||
@@ -8,6 +8,8 @@ let
|
||||
|
||||
nixos-lib = import (nixpkgs + "/nixos/lib") { };
|
||||
|
||||
filterPlatforms = lib.filter (p: nixpkgsFor?${p});
|
||||
|
||||
# https://nixos.org/manual/nixos/unstable/index.html#sec-calling-nixos-tests
|
||||
runNixOSTestFor =
|
||||
system: test:
|
||||
@@ -186,7 +188,7 @@ in
|
||||
|
||||
cgroups = runNixOSTestFor "x86_64-linux" ./cgroups;
|
||||
|
||||
setuid = lib.genAttrs [ "i686-linux" "x86_64-linux" ] (
|
||||
setuid = lib.genAttrs (filterPlatforms [ "i686-linux" "x86_64-linux" ]) (
|
||||
system: runNixOSTestFor system ./setuid/setuid.nix
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user