mirror of
https://github.com/xddxdd/nix-cachyos-kernel.git
synced 2026-07-03 11:08:07 +02:00
Fix overriding zfs-cachyos kernel module (#67)
This commit is contained in:
parent
8c8219b1f4
commit
6045b37a82
@ -18,13 +18,12 @@ lib.mapAttrs' (
|
||||
(linuxKernel.packagesFor v).extend (
|
||||
final: prev:
|
||||
let
|
||||
zfsVariant = lib.removePrefix "linux-cachyos-" v.cachyosConfigVariant;
|
||||
zfsPackages = final.callPackage ../zfs-cachyos {
|
||||
inherit inputs;
|
||||
};
|
||||
variant = lib.removePrefix "linux-cachyos-" v.cachyosConfigVariant;
|
||||
in
|
||||
{
|
||||
zfs_cachyos = zfsPackages."${zfsVariant}" or zfsPackages.latest;
|
||||
zfs_cachyos = final.callPackage ../zfs-cachyos {
|
||||
inherit inputs variant;
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
@ -2,38 +2,37 @@
|
||||
inputs,
|
||||
callPackage,
|
||||
kernel ? null,
|
||||
variant ? "latest",
|
||||
lib,
|
||||
fetchurl,
|
||||
}:
|
||||
let
|
||||
versionJson = lib.importJSON ./version.json;
|
||||
metadata = versionJson."${variant}" or versionJson.latest;
|
||||
zfsGeneric = callPackage "${inputs.nixpkgs.outPath}/pkgs/os-specific/linux/zfs/generic.nix" {
|
||||
inherit kernel;
|
||||
};
|
||||
in
|
||||
# https://github.com/chaotic-cx/nyx/blob/aacb796ccd42be1555196c20013b9b674b71df75/pkgs/linux-cachyos/packages-for.nix#L99
|
||||
lib.mapAttrs (
|
||||
variant: metadata:
|
||||
(zfsGeneric {
|
||||
kernelModuleAttribute = "zfs_cachyos";
|
||||
kernelMinSupportedMajorMinor = "1.0";
|
||||
kernelMaxSupportedMajorMinor = "99.99";
|
||||
enableUnsupportedExperimentalKernel = true;
|
||||
version = metadata.version;
|
||||
tests = { };
|
||||
maintainers = with lib.maintainers; [
|
||||
pedrohlc
|
||||
];
|
||||
hash = "";
|
||||
extraPatches = [ ];
|
||||
}).overrideAttrs
|
||||
(prevAttrs: {
|
||||
src = fetchurl {
|
||||
inherit (metadata) url hash;
|
||||
};
|
||||
postPatch = builtins.replaceStrings [ "grep --quiet '^Linux-M" ] [ "# " ] prevAttrs.postPatch;
|
||||
passthru = prevAttrs.passthru // {
|
||||
cachyosVariant = variant;
|
||||
};
|
||||
})
|
||||
) versionJson
|
||||
(zfsGeneric {
|
||||
kernelModuleAttribute = "zfs_cachyos";
|
||||
kernelMinSupportedMajorMinor = "1.0";
|
||||
kernelMaxSupportedMajorMinor = "99.99";
|
||||
enableUnsupportedExperimentalKernel = true;
|
||||
version = metadata.version;
|
||||
tests = { };
|
||||
maintainers = with lib.maintainers; [
|
||||
pedrohlc
|
||||
];
|
||||
hash = "";
|
||||
extraPatches = [ ];
|
||||
}).overrideAttrs
|
||||
(prevAttrs: {
|
||||
src = fetchurl {
|
||||
inherit (metadata) url hash;
|
||||
};
|
||||
postPatch = builtins.replaceStrings [ "grep --quiet '^Linux-M" ] [ "# " ] prevAttrs.postPatch;
|
||||
passthru = prevAttrs.passthru // {
|
||||
cachyosVariant = variant;
|
||||
};
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user