Skip to content

Commit b344568

Browse files
authored
rust-overlay: support for darwin
1 parent 78e7239 commit b344568

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rust-overlay.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,17 +289,17 @@ let
289289
cp --remove-destination "$(realpath -e $target)" $target
290290
fi
291291
292-
# The SYSROOT is determined by using the librustc_driver-*.so.
293-
# So, we need to point to the *.so files in our derivation.
292+
# The SYSROOT is determined by using the librustc_driver-*.{so,dylib}.
293+
# So, we need to point to the *.{so,dylib} files in our derivation.
294294
chmod u+w $target
295295
patchelf --set-rpath "$out/lib" $target || true
296296
done
297297
298-
# Here we copy the librustc_driver-*.so to our derivation.
298+
# Here we copy the librustc_driver-*.{so,dylib} to our derivation.
299299
# The SYSROOT is determined based on the path of this library.
300-
if ls $out/lib/librustc_driver-*.so &> /dev/null; then
301-
RUSTC_DRIVER_PATH=$(realpath -e $out/lib/librustc_driver-*.so)
302-
rm $out/lib/librustc_driver-*.so
300+
if ls $out/lib/librustc_driver-*.{so,dylib} &> /dev/null; then
301+
RUSTC_DRIVER_PATH=$(realpath -e $out/lib/librustc_driver-*.{so,dylib})
302+
rm $out/lib/librustc_driver-*.{so,dylib}
303303
cp $RUSTC_DRIVER_PATH $out/lib/
304304
fi
305305
'';

0 commit comments

Comments
 (0)