From f34ca8045a21e00bc3c49f53c1d58264ee3d15b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Nov 2025 11:27:57 +0100 Subject: [PATCH] mnt/reform: stop doing ifd --- mnt/reform/kernel.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/mnt/reform/kernel.nix b/mnt/reform/kernel.nix index 7b742b23..b67dad7a 100644 --- a/mnt/reform/kernel.nix +++ b/mnt/reform/kernel.nix @@ -34,18 +34,23 @@ let hash = "sha256-XiTuH40b3VJqzwygZzU0FcvMDj41Rq6IsMbm+3+QxDY="; }; - kernelPatches = - (map (patch: { inherit patch; }) ( - lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor modDirVersion}" - )) - ++ [ - { - patch = callPackage ./dtsPatch.nix { - inherit reformDebianPackages; - kernelSource = src; - }; - } - ]; + # Use postPatch to apply patches from a directory without IFD + postPatch = '' + for patch in ${reformDebianPackages}/linux/patches${lib.versions.majorMinor modDirVersion}/*/*.patch; do + echo "Applying patch: $patch" + patch -p1 < "$patch" + done + ''; + + kernelPatches = [ + { + name = "reform-dts"; + patch = callPackage ./dtsPatch.nix { + inherit reformDebianPackages; + kernelSource = src; + }; + } + ]; structuredExtraConfig = with lib.kernel; { # configuration options from https://source.mnt.re/reform/reform-debian-packages/-/blob/7f31ba3a6742d60d8d502c1d86e63ef5df3916bf/linux/config