diff --git a/pkgs/development/compilers/rust/binary.nix b/pkgs/development/compilers/rust/binary.nix index c546e278e7fa89..501f51cb3b8c4b 100644 --- a/pkgs/development/compilers/rust/binary.nix +++ b/pkgs/development/compilers/rust/binary.nix @@ -92,7 +92,10 @@ rec { patchShebangs ./install.sh ./install.sh --prefix=$out \ --components=cargo - + '' + lib.optionalString stdenv.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" '';