diff options
Diffstat (limited to 'pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix')
-rw-r--r-- | pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix new file mode 100644 index 0000000000000..14d7e92c8a540 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix @@ -0,0 +1,22 @@ +{ 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 |