Linker file not found: lib/arc/libarclite_macosx.a on darwin

When trying to build an Objective C program that uses the -fobjc-arc flag (Automatic Reference Counting) using the clang stdenv, the linking fails with

ld: file not found: /nix/store/29sdvdbaj16kxgzhxj72pa1dn3vrf9bw-clang-7.1.0/lib/arc/libarclite_macosx.a

Searching for this issue, I found this blog post: ToT Clang / LLVM in Xcode – Wade Tregaskis

If you try to compile a project that uses ARC, you’ll get an obnoxious linker error complaining about not being able to find libarclite_macosx.a. This is apparently some private Apple library that you cannot get the source to, let alone have bundled into the llvm repositories. Luckily, if you’re on Lion or later, you’ll find it already installed in /usr/lib/arc/. Copy that whole folder to the “lib” folder in your custom-built clang, and you’ll be good to go.

Does anyone know how to link against this file? Should it work automatically, with cctools perhaps? Any pointers would be appreciated.

Found examples compilation on macos ventura throw error libarclite_macosx.a missing · Issue #18432 · vlang/v · GitHub, which led to ios - Missing file libarclite_iphoneos.a (Xcode 14.3) - Stack Overflow and GitHub - kamyarelyasi/Libarclite-Files: Missing files in Xcode 14.3. So someone took the pain to provide these files on github. Not sure if we should use these binaries like that, but we are not alone in this endeavour.