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 (
|
(linuxKernel.packagesFor v).extend (
|
||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
zfsVariant = lib.removePrefix "linux-cachyos-" v.cachyosConfigVariant;
|
variant = lib.removePrefix "linux-cachyos-" v.cachyosConfigVariant;
|
||||||
zfsPackages = final.callPackage ../zfs-cachyos {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
zfs_cachyos = zfsPackages."${zfsVariant}" or zfsPackages.latest;
|
zfs_cachyos = final.callPackage ../zfs-cachyos {
|
||||||
|
inherit inputs variant;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,38 +2,37 @@
|
|||||||
inputs,
|
inputs,
|
||||||
callPackage,
|
callPackage,
|
||||||
kernel ? null,
|
kernel ? null,
|
||||||
|
variant ? "latest",
|
||||||
lib,
|
lib,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
versionJson = lib.importJSON ./version.json;
|
versionJson = lib.importJSON ./version.json;
|
||||||
|
metadata = versionJson."${variant}" or versionJson.latest;
|
||||||
zfsGeneric = callPackage "${inputs.nixpkgs.outPath}/pkgs/os-specific/linux/zfs/generic.nix" {
|
zfsGeneric = callPackage "${inputs.nixpkgs.outPath}/pkgs/os-specific/linux/zfs/generic.nix" {
|
||||||
inherit kernel;
|
inherit kernel;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# https://github.com/chaotic-cx/nyx/blob/aacb796ccd42be1555196c20013b9b674b71df75/pkgs/linux-cachyos/packages-for.nix#L99
|
# https://github.com/chaotic-cx/nyx/blob/aacb796ccd42be1555196c20013b9b674b71df75/pkgs/linux-cachyos/packages-for.nix#L99
|
||||||
lib.mapAttrs (
|
(zfsGeneric {
|
||||||
variant: metadata:
|
kernelModuleAttribute = "zfs_cachyos";
|
||||||
(zfsGeneric {
|
kernelMinSupportedMajorMinor = "1.0";
|
||||||
kernelModuleAttribute = "zfs_cachyos";
|
kernelMaxSupportedMajorMinor = "99.99";
|
||||||
kernelMinSupportedMajorMinor = "1.0";
|
enableUnsupportedExperimentalKernel = true;
|
||||||
kernelMaxSupportedMajorMinor = "99.99";
|
version = metadata.version;
|
||||||
enableUnsupportedExperimentalKernel = true;
|
tests = { };
|
||||||
version = metadata.version;
|
maintainers = with lib.maintainers; [
|
||||||
tests = { };
|
pedrohlc
|
||||||
maintainers = with lib.maintainers; [
|
];
|
||||||
pedrohlc
|
hash = "";
|
||||||
];
|
extraPatches = [ ];
|
||||||
hash = "";
|
}).overrideAttrs
|
||||||
extraPatches = [ ];
|
(prevAttrs: {
|
||||||
}).overrideAttrs
|
src = fetchurl {
|
||||||
(prevAttrs: {
|
inherit (metadata) url hash;
|
||||||
src = fetchurl {
|
};
|
||||||
inherit (metadata) url hash;
|
postPatch = builtins.replaceStrings [ "grep --quiet '^Linux-M" ] [ "# " ] prevAttrs.postPatch;
|
||||||
};
|
passthru = prevAttrs.passthru // {
|
||||||
postPatch = builtins.replaceStrings [ "grep --quiet '^Linux-M" ] [ "# " ] prevAttrs.postPatch;
|
cachyosVariant = variant;
|
||||||
passthru = prevAttrs.passthru // {
|
};
|
||||||
cachyosVariant = variant;
|
})
|
||||||
};
|
|
||||||
})
|
|
||||||
) versionJson
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user