mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
apple-framework-System: fix System.tbd dangling symbolic link
Contrarily to the other frameworks, System framework's TBD file is a symlink pointing to `${MacOSX-SDK}/usr/lib/libSystem.B.tbd`. This produces an error when using the framework, as: 1. The original file is not copied into the output directory 2. Even if it was copied, the relative path wouldn't match Resulting in the symlink being broken and the linker failing when trying to link `-framework System`. The fix applied consists in replacing the symbolic link with the actual file, as this is easier than fixing the link and doesn't seem to produce any side effects.
This commit is contained in:
parent
7486a74d9f
commit
815d6c0d3e
@ -233,6 +233,19 @@ in rec {
|
||||
$out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h
|
||||
'';
|
||||
});
|
||||
|
||||
System = lib.overrideDerivation super.System (drv: {
|
||||
installPhase = drv.installPhase + ''
|
||||
# Contrarily to the other frameworks, System framework's TBD file
|
||||
# is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd.
|
||||
# This produces an error when installing the framework as:
|
||||
# 1. The original file is not copied into the output directory
|
||||
# 2. Even if it was copied, the relative path wouldn't match
|
||||
# Thus, it is easier to replace the file than to fix the symlink.
|
||||
cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \
|
||||
$out/Library/Frameworks/System.framework/Versions/B/System.tbd
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
# Merge extraDeps into generatedDeps.
|
||||
|
Loading…
Reference in New Issue
Block a user