Drop the deprecated "linuxPackage1" function, rename "linuxPackage2" to "linuxPackage"

This commit is contained in:
mexisme 2024-01-31 12:00:03 +13:00
parent f2fbed9ce6
commit 7def533968
2 changed files with 4 additions and 20 deletions

View File

@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkOption types;
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage2 surfacePatches;
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches;
cfg = config.microsoft-surface;
@ -12,7 +12,7 @@ let
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage2 {
kernelPackages = linuxPackage {
inherit version kernelPatches;
sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw=";
ignoreConfigErrors=true;

View File

@ -9,20 +9,7 @@ let
inherit (lib) recurseIntoAttrs versions;
repos = pkgs.callPackage ../repos.nix {};
# Version 1 of the linuxPackage function:
# (DEPRECATED)
linuxPackage1 =
{ version,
modDirVersion ? version,
...
} @ args:
let
buildLinux' = buildLinux (args // { inherit modDirVersion; });
linuxPackagesFor' = linuxPackagesFor buildLinux';
in recurseIntoAttrs linuxPackagesFor';
# Version 1 of the linuxPackage function, with hopefully simplified arguments:
linuxPackage2 =
linuxPackage =
{ url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz",
sha256 ? null,
src ? (fetchurl { inherit url sha256; }),
@ -50,8 +37,5 @@ let
};
in {
inherit linuxPackage1 linuxPackage2 repos surfacePatches;
# Default version:
linuxPackage = linuxPackage2;
inherit linuxPackage repos surfacePatches;
}