Alternative fix that should support both old and new nixpkgs

This commit is contained in:
Lan Tian 2026-06-11 19:20:28 -07:00
parent 9274620f17
commit 6cd613f177
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B

View File

@ -36,9 +36,20 @@ rec {
stdenvLLVM =
let
mkLLVMPlatform =
platform:
platform
// {
linux-kernel = (platform.linux-kernel or { }) // {
makeFlags = (platform.linux-kernel.makeFlags or [ ]) ++ ltoMakeflags;
};
};
stdenv' = pkgs.overrideCC hostLLVM.stdenv hostLLVM.clangUseLLVM;
in
stdenv'.override (old: {
hostPlatform = mkLLVMPlatform stdenv'.hostPlatform;
buildPlatform = mkLLVMPlatform stdenv'.buildPlatform;
extraNativeBuildInputs = [
hostLLVM.lld
pkgs.patchelf