From f0c963957bdc931ac35943d1fa31c99b6db35521 Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Mon, 24 Jun 2024 09:18:51 -0400 Subject: [PATCH] remove overrideDerivation It wasn't fully applied and it isn't necessary for these overrides anyway --- overlays/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index d8f328f..5f5850f 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -41,13 +41,13 @@ let version-slug = builtins.replaceStrings [ "v" "_" ] [ "" "." ] version; in { - "${version}"."${board}" = prev.lib.overrideDerivation (prev.buildLinux { + "${version}"."${board}" = (final.buildLinux { modDirVersion = version-slug; version = version-slug; pname = "linux-rpi"; src = kernel.src; defconfig = "${board}_defconfig"; - structuredExtraConfig = with prev.lib.kernel; { + structuredExtraConfig = with final.lib.kernel; { # Workaround https://github.com/raspberrypi/linux/issues/6198 # Needed because NixOS 24.05+ sets DRM_SIMPLEDRM=y which pulls in # DRM_KMS_HELPER=y. @@ -72,14 +72,16 @@ let KUNIT = no; }; features.efiBootStub = false; - postConfigure = '' - # The v7 defconfig has this set to '-v7' which screws up our modDirVersion. - sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' - sed -i $buildRoot/include/config/auto.conf -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' - ''; - postFixup = ""; - kernelPatches = if kernel.patches != null then kernel.patches else [ ]; - }); + kernelPatches = + if kernel ? "patches" then kernel.patches else [ ]; + }).overrideAttrs + (oldAttrs: { + postConfigure = '' + # The v7 defconfig has this set to '-v7' which screws up our modDirVersion. + sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' + sed -i $buildRoot/include/config/auto.conf -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' + ''; + }); }; rpi-kernels = builtins.foldl' (b: a: b // rpi-kernel a) { }; in