diff --git a/pkgs/development/compilers/rust/binary.nix b/pkgs/development/compilers/rust/binary.nix index df3b8f729f7f9..0a6343e9bd943 100644 --- a/pkgs/development/compilers/rust/binary.nix +++ b/pkgs/development/compilers/rust/binary.nix @@ -124,7 +124,10 @@ rec { patchShebangs ./install.sh ./install.sh --prefix=$out \ --components=cargo - + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' + install_name_tool -change "/usr/lib/libcurl.4.dylib" \ + "${curl.out}/lib/libcurl.4.dylib" "$out/bin/cargo" + '' + '' wrapProgram "$out/bin/cargo" \ --suffix PATH : "${rustc}/bin" '';