6d90a8b894
Adds the static overlay that can be used to build Nixpkgs statically. Can be used like: nix build pkgsStatic.hello Not all packages build, as some rely on dynamic linking.
10 lines
367 B
Bash
10 lines
367 B
Bash
# Make /nix/store/...-libSystem “portable” for static built binaries.
|
|
# This just rewrites everything in $1/bin to use the
|
|
# /usr/lib/libSystem.B.dylib that is provided on every macOS system.
|
|
|
|
fixupOutputHooks+=('fixLibsystemRefs $prefix')
|
|
|
|
fixLibsystemRefs() {
|
|
find "$1/bin" \
|
|
-exec install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
|
|
}
|