How to resolve darwin Big Sur "ld: file not found: /usr/lib/system/libcache.dylib"

Hi all, I’ve recently looked to update a nix shell to the latest (by introducing niv to the repo), and lots of things fail to build.

I’m getting the following error — is there a work-around I can put in place?

copying path '/nix/store/80jwh0hf2niifnqzaa60wvvmcsbjkj5x-curl-7.70.0' from ''...
building '/nix/store/82wss8rmhgiqhjf91rndc80r6dmwgza0-mirrors-list.drv'...
copying path '/nix/store/650yncb65s9llsd5l7xgjy1pilzf7w88-swift-corefoundation' from ''...
building '/nix/store/h9ni3h0ih01sgbga5xkjg22wqml9mk0c-undmg-1.0.3.drv'...
unpacking sources
unpacking source archive /nix/store/pv0pnbcq96m4dll3gyb17w3nmjvvsxlp-source
source root is source
patching sources
no configure script, doing nothing
build flags: SHELL=/nix/store/74nqyf0fxhph9gh3dbb4cj4q4wrr2rb6-bash-4.4-p23/bin/bash PREFIX=\$\(out\)
cc -c abstractfile.c -o abstractfile.o
cc -c resources.c -o resources.o
cc -c catalog.c -o catalog.o
cc -c dmgfile.c -o dmgfile.o
cc -c btree.c -o btree.o
cc -c hfslib.c -o hfslib.o
cc -c main.c -o main.o
cc -c hfscompress.c -o hfscompress.o
cc -c utility.c -o utility.o
cc -c dmglib.c -o dmglib.o
cc -c base64.c -o base64.o
cc -c checksum.c -o checksum.o
cc -c xattr.c -o xattr.o
cc -c fastunicodecompare.c -o fastunicodecompare.o
cc -c extents.c -o extents.o
cc -c udif.c -o udif.o
cc -c io.c -o io.o
cc -c partition.c -o partition.o
cc -c volume.c -o volume.o
cc -c rawfile.c -o rawfile.o
cc -lz -lc -lbz2 abstractfile.o resources.o catalog.o dmgfile.o btree.o hfslib.o main.o hfscompress.o utility.o dmglib.o base64.o checksum.o xattr.o fastunicodecompare.o extents.o udif.o io.o partition.o volume.o rawfile.o -o undmg
ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:11: undmg] Error 1
builder for '/nix/store/h9ni3h0ih01sgbga5xkjg22wqml9mk0c-undmg-1.0.3.drv' failed with exit code 2
copying path '/nix/store/laf8qli1vgv149hiqwazcryf3vzrdjc4-bootstrap-stage3-stdenv-darwin' from ''...
cannot build derivation '/nix/store/14slxsdjpf1dd6h970lg85n7sk0i3b36-Chromium-90.0.4430.212.drv': 1 dependencies couldn't be built
error: build of '/nix/store/14slxsdjpf1dd6h970lg85n7sk0i3b36-Chromium-90.0.4430.212.drv', '/nix/store/sxdsixmdxq8ik09ijrwr6rzrmsn69av2-chromedriver-90.0.4430.212.drv' failed

System info

% nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.01 MiB download, 0.03 MiB unpacked):
copying path '/nix/store/6v47rygwaahny2wsmn9avnczf0sd2dn3-DarwinTools-1' from ''...
copying path '/nix/store/sbazpkxvzplf2yfxcvq7q0f1v6qmfiva-nix-info' from ''...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 20.5.0, macOS 10.16`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.10`
 - channels(ldeck): `"nixpkgs-21.05pre287067.0d337eb6b77"`
 - nixpkgs: `/Users/ldeck/.nix-defexpr/channels/nixpkgs`

@matthewbauer would you have any work-arounds for this?