This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
A lot of non-executable files in the build output are marked as
executable, including a header file, which causes `install_name_tool` to
fail.
We now search `/bin` and `/share/**/samples` specifically and check that
the file is a Mach-O binary before patching.