Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions rust-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,11 @@ let
fi
done

# Here we copy the librustc_driver-*.so to our derivation.
# Here we copy the librustc_driver-*.{so,dylib} to our derivation.
# The SYSROOT is determined based on the path of this library.
if test "" != $out/lib/librustc_driver-*.so &> /dev/null; then
RUSTC_DRIVER_PATH=$(realpath -e $out/lib/librustc_driver-*.so)
rm $out/lib/librustc_driver-*.so
cp $RUSTC_DRIVER_PATH $out/lib/
if test "" != $out/lib/librustc_driver-*${stdenv.hostPlatform.extensions.sharedLibrary} &> /dev/null; then
RUSTC_DRIVER_PATH=$(realpath -e $out/lib/librustc_driver-*${stdenv.hostPlatform.extensions.sharedLibrary})
cp --remove-destination $RUSTC_DRIVER_PATH $out/lib/
fi
'';

Expand Down