2021-05-28 09:39:13 +00:00
|
|
|
{ stdenvNoCC, MacOSX-SDK, libcharset }:
|
|
|
|
|
|
|
|
let self = stdenvNoCC.mkDerivation {
|
|
|
|
pname = "libobjc";
|
|
|
|
version = MacOSX-SDK.version;
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-02-02 18:25:31 +00:00
|
|
|
mkdir -p $out/{include,lib/swift}
|
2021-05-28 09:39:13 +00:00
|
|
|
cp -r ${MacOSX-SDK}/usr/include/objc $out/include
|
|
|
|
cp ${MacOSX-SDK}/usr/lib/libobjc* $out/lib
|
2023-02-02 18:25:31 +00:00
|
|
|
cp -r ${MacOSX-SDK}/usr/lib/swift/ObjectiveC.swiftmodule $out/lib/swift
|
|
|
|
cp ${MacOSX-SDK}/usr/lib/swift/libswiftObjectiveC.tbd $out/lib/swift
|
2021-05-28 09:39:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tbdRewrites = {
|
|
|
|
const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib";
|
2023-02-02 18:25:31 +00:00
|
|
|
const."/usr/lib/swift/libswiftObjectiveC.dylib" = "${self}/lib/swift/libswiftObjectiveC.dylib";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}; in self
|