linux: remove assert on linux

Asserting the hostplatform for `linux` is bad, because it can't be
caught by CI. For the `linux` package itself, it doesn't make a
difference, because it also has `meta.platforms = linux` set, so this
will fail evaluation - and in a way that can nicely be caught by CI.

(cherry picked from commit 0febbb4ff9)
This commit is contained in:
Wolfgang Walther
2025-07-21 20:11:42 +02:00
committed by github-actions[bot]
parent 3fa9874c53
commit ac946e166a
3 changed files with 12 additions and 13 deletions

View File

@@ -91,8 +91,6 @@ let
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
assert stdenv.hostPlatform.isLinux;
let
# Dirty hack to make sure that `version` & `src` have
# `<nixpkgs/pkgs/os-specific/linux/kernel/linux-x.y.nix>` as position

View File

@@ -55,5 +55,6 @@ stdenv.mkDerivation rec {
mic92
mbbx6spp
];
platforms = lib.platforms.linux;
};
}

View File

@@ -21,14 +21,14 @@ let
label = "test";
};
in
pkgs.recurseIntoAttrs {
nixos-test =
(pkgs.nixos {
system.nixos = dummyVersioning;
boot.loader.grub.enable = false;
fileSystems."/".device = "/dev/null";
system.stateVersion = lib.trivial.release;
}).toplevel;
}
lib.optionalAttrs (stdenv.hostPlatform.isLinux) (
pkgs.recurseIntoAttrs {
nixos-test =
(pkgs.nixos {
system.nixos = dummyVersioning;
boot.loader.grub.enable = false;
fileSystems."/".device = "/dev/null";
system.stateVersion = lib.trivial.release;
}).toplevel;
}
)