From 6cd613f177ba39598cbf8b04fbe885d967dee771 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Thu, 11 Jun 2026 19:20:28 -0700 Subject: [PATCH] Alternative fix that should support both old and new nixpkgs --- helpers.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/helpers.nix b/helpers.nix index 43a04d5..e75bcf5 100644 --- a/helpers.nix +++ b/helpers.nix @@ -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