···11+diff --git a/src/linker.cpp b/src/linker.cpp
22+index ec165ef7d..91a28b8fc 100644
33+--- a/src/linker.cpp
44++++ b/src/linker.cpp
55+@@ -769,18 +769,6 @@ try_cross_linking:;
66+ gbString platform_lib_str = gb_string_make(heap_allocator(), "");
77+ defer (gb_string_free(platform_lib_str));
88+ if (build_context.metrics.os == TargetOs_darwin) {
99+- platform_lib_str = gb_string_appendc(platform_lib_str, "-Wl,-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib ");
1010+-
1111+- // Homebrew's default library path, checking if it exists to avoid linking warnings.
1212+- if (gb_file_exists("/opt/homebrew/lib")) {
1313+- platform_lib_str = gb_string_appendc(platform_lib_str, "-L/opt/homebrew/lib ");
1414+- }
1515+-
1616+- // MacPort's default library path, checking if it exists to avoid linking warnings.
1717+- if (gb_file_exists("/opt/local/lib")) {
1818+- platform_lib_str = gb_string_appendc(platform_lib_str, "-L/opt/local/lib ");
1919+- }
2020+-
2121+ // Only specify this flag if the user has given a minimum version to target.
2222+ // This will cause warnings to show up for mismatched libraries.
2323+ if (build_context.minimum_os_version_string_given) {
···1515 cython,
1616 fetchFromGitHub,
1717 git,
1818- darwin,
1918 jsoncpp,
2019 nsync,
2120 openssl,
···409408 );
410409411410 # Note: we cannot do most of this patching at `patch` phase as the deps
412412- # are not available yet. Framework search paths aren't added by bintools
413413- # hook. See https://github.com/NixOS/nixpkgs/pull/41914.
411411+ # are not available yet.
414412 preBuild = lib.optionalString effectiveStdenv.hostPlatform.isDarwin ''
415415- export NIX_LDFLAGS+=" -F${darwin.apple_sdk.frameworks.IOKit}/Library/Frameworks"
416413 substituteInPlace ../output/external/rules_cc/cc/private/toolchain/osx_cc_wrapper.sh.tpl \
417414 --replace "/usr/bin/install_name_tool" "${cctools}/bin/install_name_tool"
418415 substituteInPlace ../output/external/rules_cc/cc/private/toolchain/unix_cc_configure.bzl \