diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index b23cd1616f13..a9388f6ad64e 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -56,10 +56,20 @@ rustPlatform.buildRustPackage (finalAttrs: { ./tests-darwin-differences.patch ./tests-no-chown.patch ]; - postPatch = '' - # Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857 - tomlq -ti '.workspace.dependencies.libffi = { "version": .workspace.dependencies.libffi, "features": ["system"] }' Cargo.toml - ''; + postPatch = + '' + # Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857 + tomlq -ti '.workspace.dependencies.libffi = { "version": .workspace.dependencies.libffi, "features": ["system"] }' Cargo.toml + '' + + + lib.optionalString + (stdenv.hostPlatform.isLinux || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)) + '' + # LTO crashes with the latest Rust + LLVM combination. + # https://github.com/rust-lang/rust/issues/141737 + # TODO: remove this once LLVM is upgraded to 20.1.7 + tomlq -ti '.profile.release.lto = false' Cargo.toml + ''; buildInputs = [ libffi