currently builds on aarch64-darwin, but not on x86_64-darwin.
Blender (specifically the ghost window library) depends on "metal" on
apple devices.
(For details see source/intern/ghost/intern/GHOST_System.cc line 416ff)
It cannot build without it. Metal support should be
introduced by apple sdk 11_1 (?) onward. Once this has been updated in
nixpkgs, this derivation can be revised.
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
Co-authored-by: Alexis Hildebrandt <afh@surryhill.net>
This enables building of Blender.app. The standard build process assumes
that the dependencies are installed in subdirectoris inside $LIBDIR with
libraries built as static. In current implementation we are not looking
to achieve portability, so cmake files are patched to link dynamically
with the libraries in the nix store. Linking to the transitive
dependencies is not needed in the shared case. There are also some minor
inconsistensies in the expected paths, which also need to be patched.
Alternatively, we could patch cmake files to treat darwin as "unix", but
that would require more tweaking to ensure that the frameworks are being
linked properly.