This commit is contained in:
mjallen18
2025-12-11 19:14:52 -06:00
parent 31202f8b0e
commit 8d1a9312cb
13 changed files with 64 additions and 37 deletions

View File

@@ -8,6 +8,7 @@
linuxPackagesFor,
fetchFromGitHub,
lib,
pkgs,
buildPackages,
ogKernelConfigfile ? linuxPackages.kernel.passthru.configfile,
withUpdateScript ? null,
@@ -30,7 +31,9 @@
withoutDebug ? false,
description ? "Linux EEVDF-BORE scheduler Kernel by CachyOS with other patches and improvements",
# For flakes
inputs,
inputs ? { },
# Explicitly accept nixpkgs, falling back to inputs or the system path
nixpkgs ? inputs.nixpkgs or pkgs.path,
}:
let
@@ -106,12 +109,14 @@ let
kernelPatches = [ ];
configfile = preparedConfigfile;
config = linuxConfigTransfomed;
# For tests
inherit (inputs) flakes final;
# For tests: Use 'or null' so it doesn't crash if inputs is empty
flakes = inputs.flakes or null;
final = inputs.final or null;
kernelPackages = packagesWithRightPlatforms;
};
commonMakeFlags = import "${inputs.nixpkgs}/pkgs/os-specific/linux/kernel/common-flags.nix" {
# Use 'nixpkgs' argument instead of 'inputs.nixpkgs'
commonMakeFlags = import "${nixpkgs}/pkgs/os-specific/linux/kernel/common-flags.nix" {
inherit
lib
stdenv
@@ -124,7 +129,7 @@ let
addOurs = finalAttrs: prevAttrs: {
kernel_configfile = prevAttrs.kernel.configfile;
zfs_cachyos =
(finalAttrs.callPackage "${inputs.nixpkgs}/pkgs/os-specific/linux/zfs/generic.nix"
(finalAttrs.callPackage "${nixpkgs}/pkgs/os-specific/linux/zfs/generic.nix"
zfsOverride
{
kernelModuleAttribute = "zfs_cachyos";