From 8ddb97b75af67cbddb8f08e7b6ab321c9dae6617 Mon Sep 17 00:00:00 2001 From: Tom van Dijk <18gatenmaker6@gmail.com> Date: Wed, 14 May 2025 19:43:24 +0200 Subject: [PATCH] evcxr: remove mold on darwin by default --- pkgs/by-name/ev/evcxr/package.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ev/evcxr/package.nix b/pkgs/by-name/ev/evcxr/package.nix index 3ac0a2963e1e..581420e88300 100644 --- a/pkgs/by-name/ev/evcxr/package.nix +++ b/pkgs/by-name/ev/evcxr/package.nix @@ -12,6 +12,9 @@ mold, rustc, nix-update-script, + + # On non-darwin, `mold` is the default linker, but it's broken on Darwin. + withMold ? with stdenv.hostPlatform; isUnix && !isDarwin, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -67,12 +70,14 @@ rustPlatform.buildRustPackage (finalAttrs: { wrap = exe: '' wrapProgram $out/bin/${exe} \ --prefix PATH : ${ - lib.makeBinPath [ - cargo - gcc - mold # fix fatal error: "unknown command line option: -run" - rustc # requires rust edition 2024 - ] + lib.makeBinPath ( + [ + cargo + gcc + rustc + ] + ++ lib.optional withMold mold + ) } \ --set-default RUST_SRC_PATH "$RUST_SRC_PATH" '';