Override kernel build dependencies

Thanks for your reply!

I understood what I was doing wrong with overrideAttrs, it’s clearer now.

However I’m not sure how to add my dependencies without override. I tried:

  • Adding nativeBuildInputs and/or depsBuildBuild to the kernel record. It didn’t change anything
  • I tried to call buildKernel THEN overrideDerivation to override configfile with overrideAttrs which contains a nativeBuildInputs and append nixpkgs.ubootTools to it. It failed because ubootTools was not in nixpkgs. I switched to pkgs.ubootTools which compiled this time but did not work because this produce an aarch64 binary on a x86_64 computer
  • I noticed this so I tried to add stdenv.hostPlatform.linux-kernel.target = "uImage" which had no effect. I then tried to redo the override chain described on the step before but this time trying to modify this in order to add my dependencies. But this did not work either because after the call to overrideDerivation on the result of buildLinux call kept saying that kernel (this) was not present

Clearly my use case seem to be handled by this but I just don’t understand how am I supposed to make this condition true…