depot/third_party/nixpkgs/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

22 lines
690 B
Nix

{ stdenvNoCC, darwin-stubs }:
let
self = stdenvNoCC.mkDerivation {
pname = "libobjc";
inherit (darwin-stubs) version;
buildCommand = ''
mkdir -p $out/{include,lib/swift}
cp -r ${darwin-stubs}/usr/include/objc $out/include
cp ${darwin-stubs}/usr/lib/libobjc* $out/lib
cp -r ${darwin-stubs}/usr/lib/swift/ObjectiveC.swiftmodule $out/lib/swift
cp ${darwin-stubs}/usr/lib/swift/libswiftObjectiveC.tbd $out/lib/swift
'';
passthru.tbdRewrites = {
const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib";
const."/usr/lib/swift/libswiftObjectiveC.dylib" = "${self}/lib/swift/libswiftObjectiveC.dylib";
};
};
in
self