The same flake compiles on macOS Catalina but not Big Sur

Hi all,

I’m trying to get my colleagues to use nix. So far I prepared a basic flake.nix with a package ROOT (the derivation is mostly pulled from the official package, with minor tweak and nixpkgs-fmt applied). The project is at here.

One of my colleagues is using macOS Big Sur, the other Catalina. I asked both to install nix-unstable with numtide’s installer, tweaked their /etc/nix/nix.conf to be the following:

build-users-group = nixbld
experimental-features = nix-command flakes
sandbox = false

They both have nix flake command working. But in my project, Big Sur reported the following error during compilation:

error: builder for '/nix/store/sqym5b5sxva0wg9xjr4ri1fpj5ggiqrv-root-6.24.00.drv' failed with exit code 2;
    last 10 log lines:
    > [ 79%] Linking CXX shared library ../../../lib/
    > [ 79%] Built target Cling
    > [ 79%] Built target G__Core
    > Scanning dependencies of target Core
    > [ 79%] Linking CXX shared library ../lib/
    > ld: framework not found CoreSymbolication
    > clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
    > make[2]: *** [core/CMakeFiles/Core.dir/build.make:502: lib/] Error 1
    > make[1]: *** [CMakeFiles/Makefile2:24441: core/CMakeFiles/Core.dir/all] Error 2
    > make: *** [Makefile:171: all] Error 2
    For full logs, run 'nix log /nix/store/sqym5b5sxva0wg9xjr4ri1fpj5ggiqrv-root-6.24.00.drv'.
error: 1 dependencies of derivation '/nix/store/pplxs4j9b25zzvaccalg1bpq9cplwlq1-root-curated-env.drv' failed to build

whereas Catalina works without problem. It is also worth noting that the official ROOT package works on both with a nix-shell:

nix-shell --pure -p root

Somehow on Big Sur, the linker can’t find the underlying apple library? What should I do to fix that?