linux: drop hacky passing around of positions

This is something I introduced in 63185299f4
to make sure the `version`/`src` attributes point to the files that declare
the version such that we get pinged by ofborg for updates.

This is long obsolete since the versions are maintained in a JSON file
now. Also, the kernel team is listed as owner in the ci/OWNERS file for
the entire subtree, so we definitely get pinged by CI nowadays.

Hence, remove the hackery.
This commit is contained in:
Maximilian Bosch
2025-10-24 18:06:29 +02:00
parent 965ea7b1ea
commit 845e340ed9
2 changed files with 20 additions and 43 deletions
+20 -39
View File
@@ -24,6 +24,8 @@ let
overridableKernel = lib.makeOverridable (
# The kernel source tarball.
{
pname ? "linux",
src,
# The kernel version.
@@ -96,25 +98,6 @@ let
# files.
let
# Dirty hack to make sure that `version` & `src` have
# `<nixpkgs/pkgs/os-specific/linux/kernel/linux-x.y.nix>` as position
# when using `builtins.unsafeGetAttrPos`.
#
# This is to make sure that ofborg actually detects changes in the kernel derivation
# and pings all maintainers.
#
# For further context, see https://github.com/NixOS/nixpkgs/pull/143113#issuecomment-953319957
basicArgs = removeAttrs args (
lib.filter (
x:
!(builtins.elem x [
"version"
"pname"
"src"
])
) (lib.attrNames args)
);
# Combine the `features' attribute sets of all the kernel patches.
kernelFeatures = lib.foldr (x: y: (x.features or { }) // y) (
{
@@ -298,26 +281,25 @@ let
};
}; # end of configfile derivation
kernel = (callPackage ./manual-config.nix { inherit lib stdenv buildPackages; }) (
basicArgs
// {
inherit
kernelPatches
randstructSeed
extraMakeFlags
extraMeta
configfile
modDirVersion
;
pos = builtins.unsafeGetAttrPos "version" args;
kernel = (callPackage ./manual-config.nix { inherit lib stdenv buildPackages; }) {
inherit
pname
version
src
kernelPatches
randstructSeed
extraMakeFlags
extraMeta
configfile
modDirVersion
;
config = {
CONFIG_MODULES = "y";
CONFIG_FW_LOADER = "y";
CONFIG_RUST = if withRust then "y" else "n";
};
}
);
config = {
CONFIG_MODULES = "y";
CONFIG_FW_LOADER = "y";
CONFIG_RUST = if withRust then "y" else "n";
};
};
in
kernel.overrideAttrs (
@@ -326,7 +308,6 @@ let
passthru =
previousAttrs.passthru or { }
// extraPassthru
// basicArgs
// {
features = kernelFeatures;
inherit
@@ -51,8 +51,6 @@ lib.makeOverridable (
version,
# The kernel pname (should be set for variants)
pname ? "linux",
# Position of the Linux build expression
pos ? null,
# Additional kernel make flags
extraMakeFlags ? [ ],
# The name of the kernel module directory
@@ -551,8 +549,6 @@ lib.makeOverridable (
karch = stdenv.hostPlatform.linuxArch;
pos = lib.optionalDrvAttr (pos != null) pos;
meta = {
# https://github.com/NixOS/nixpkgs/pull/345534#issuecomment-2391238381
broken = withRust && lib.versionOlder version "6.12";