From 55812d7b48ed50ed2c50cb2dd28b5991eaa37dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 19 Aug 2022 10:25:05 +0200 Subject: [PATCH] linux_5_4_hardened: don't build on x86_64-linux anymore 5.4 hasn't configured successfully on x86_64-linux for months. People don't seem to care, but the 5.4 packages clutter failure lists on Hydra + tools. https://hydra.nixos.org/job/nixpkgs/trunk/linux_5_4_hardened.x86_64-linux/all Perhaps surprisingly, it works on aarch64-linux and also on older kernels. --- pkgs/os-specific/linux/kernel/hardened/config.nix | 3 ++- pkgs/top-level/linux-kernels.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/config.nix b/pkgs/os-specific/linux/kernel/hardened/config.nix index 3e3cd149c4d9..0beab0725f6a 100644 --- a/pkgs/os-specific/linux/kernel/hardened/config.nix +++ b/pkgs/os-specific/linux/kernel/hardened/config.nix @@ -8,13 +8,14 @@ # # See also -{ lib, version }: +{ stdenv, lib, version }: with lib; with lib.kernel; with (lib.kernel.whenHelpers version); assert (versionAtLeast version "4.9"); +assert (stdenv.hostPlatform.isx86_64 -> versions.majorMinor version != "5.4"); { # Report BUG() conditions and kill the offending process. diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index e2e20726525b..5c78eb12f105 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -36,7 +36,7 @@ let modDirVersion' = builtins.replaceStrings [ kernel.version ] [ version ] kernel.modDirVersion; in kernel.override { structuredExtraConfig = import ../os-specific/linux/kernel/hardened/config.nix { - inherit lib version; + inherit stdenv lib version; }; argsOverride = { inherit version;