mirror of
https://github.com/xddxdd/nix-cachyos-kernel.git
synced 2026-07-03 19:18:07 +02:00
Use applyPatches to simplify code
This commit is contained in:
parent
696f7401aa
commit
9f04a1fade
@ -5,6 +5,7 @@
|
|||||||
buildLinux,
|
buildLinux,
|
||||||
stdenv,
|
stdenv,
|
||||||
kernelPatches,
|
kernelPatches,
|
||||||
|
applyPatches,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.makeOverridable (
|
lib.makeOverridable (
|
||||||
@ -74,9 +75,9 @@ lib.makeOverridable (
|
|||||||
);
|
);
|
||||||
|
|
||||||
# buildLinux doesn't accept postPatch, so adding config file early here
|
# buildLinux doesn't accept postPatch, so adding config file early here
|
||||||
patchedSrc = stdenv.mkDerivation {
|
patchedSrc = applyPatches {
|
||||||
pname = "${pname}-src";
|
name = "linux-src-patched";
|
||||||
inherit version src prePatch;
|
inherit src;
|
||||||
patches = [
|
patches = [
|
||||||
kernelPatches.bridge_stp_helper.patch
|
kernelPatches.bridge_stp_helper.patch
|
||||||
kernelPatches.request_key_helper.patch
|
kernelPatches.request_key_helper.patch
|
||||||
@ -87,13 +88,6 @@ lib.makeOverridable (
|
|||||||
install -Dm644 ${cachyosConfigFile} arch/x86/configs/cachyos_defconfig
|
install -Dm644 ${cachyosConfigFile} arch/x86/configs/cachyos_defconfig
|
||||||
''
|
''
|
||||||
+ postPatch;
|
+ postPatch;
|
||||||
dontConfigure = true;
|
|
||||||
dontBuild = true;
|
|
||||||
dontFixup = true;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -r * $out/
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultLocalVersion = if lto == "none" then "-cachyos" else "-cachyos-lto";
|
defaultLocalVersion = if lto == "none" then "-cachyos" else "-cachyos-lto";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user