anchor.diff:    # Dependencies that are required to build kernel modules
     moduleBuildDependencies = optional (lib.versionAtLeast version "4.14") libelf;
   
  +
     installkernel = writeTextFile { name = "installkernel"; executable=true; text = ''
       #!${stdenv.shell} -e
       mkdir -p $4
  
positive.code:       } // config_;
  
        isModular = config.isYes "MODULES";
  
        installsFirmware = (config.isEnabled "FW_LOADER") &&
          (isModular || (config.isDisabled "FIRMWARE_IN_KERNEL")) &&
  
negative.code:         "KBUILD_BUILD_VERSION=1-NixOS"
          kernelConf.target
          "vmlinux"  # for "perf" and things like that
        ] ++ optional isModular "modules"
          ++ optional buildDTBs "dtbs"
        ++ extraMakeFlags;
  
        installFlags = [
          "INSTALLKERNEL=${installkernel}"
          "INSTALL_PATH=$(out)"
        ] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
        ++ optional installsFirmware "INSTALL_FW_PATH=$(out)/lib/firmware"
        ++ optionals buildDTBs ["dtbs_install" "INSTALL_DTBS_PATH=$(out)/dtbs"];
  
        preInstall = ''
          installFlagsArray+=("-j$NIX_BUILD_CORES")
  