diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index 5dc57f43e4ab..c5bc50cafd71 100644 --- a/pkgs/os-specific/darwin/binutils/default.nix +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -56,8 +56,8 @@ stdenv.mkDerivation { # and using clang directly here is a better option than relying on cctools. # On x86_64-darwin the Clang version is too old to support this mode. + lib.optionalString stdenv.isAarch64 '' - rm $out/bin/as - makeWrapper "${clang-unwrapped}/bin/clang" "$out/bin/as" \ + rm $out/bin/${targetPrefix}as + makeWrapper "${clang-unwrapped}/bin/clang" "$out/bin/${targetPrefix}as" \ --add-flags "-x assembler -integrated-as -c" '';