{"id":14967886,"url":"https://github.com/nixos/darwin-stubs","last_synced_at":"2025-10-19T09:31:57.108Z","repository":{"id":49817192,"uuid":"312004957","full_name":"NixOS/darwin-stubs","owner":"NixOS","description":"Text API (TAPI) files to support a pure build environment on macOS in nixpkgs.","archived":false,"fork":false,"pushed_at":"2022-09-27T10:54:03.000Z","size":1312,"stargazers_count":11,"open_issues_count":3,"forks_count":8,"subscribers_count":41,"default_branch":"main","last_synced_at":"2024-04-15T12:49:38.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NixOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-11T15:05:21.000Z","updated_at":"2023-12-03T00:22:26.000Z","dependencies_parsed_at":"2023-01-18T18:45:32.686Z","dependency_job_id":null,"html_url":"https://github.com/NixOS/darwin-stubs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fdarwin-stubs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fdarwin-stubs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fdarwin-stubs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fdarwin-stubs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NixOS","download_url":"https://codeload.github.com/NixOS/darwin-stubs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867838,"owners_count":16554368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:38:49.455Z","updated_at":"2025-10-19T09:31:49.475Z","avatar_url":"https://github.com/NixOS.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# darwin-stubs\n\nText API (TAPI) files to support a pure build environment on macOS in\nnixpkgs.\n\n## Generation\n\n    nix run -f scripts -c generate-all -s \"$MACOS_10_12_SYSROOT\" -o stubs/10.12\n\n## Framework Names\n\nThese are derived from nixpkgs and stored in this repository for\nconsistency. To update:\n\n    nix run -f scripts -c update-framework-names -o scripts/framework-names.json\n\n## Re-exports and absolute paths\n\nSome libraries frameworks contain a `re-exports` section that exposes\nother libraries and frameworks by their absolute path. When generating\nstubs, the scripts recuse through all `re-exports` entries.\n\nIn regular usage of detached tbd stubs, the linker will use the\n`syslibroot` option to find libraries by their absolute\nnames[1][]. Nixpkgs does not have a single SDK to pass as the\n`syslibroot`, but passes individual frameworks as required. To support\nre-exports, the absolute paths are rewritten to the corresponding nix\nstore paths of the stubs.\n\nFor libSystem the re-exports are trivial enough that it's sufficient\nto replace `/usr/lib/libsystem` with `$out/lib/libsystem`, which is\npart of the libSystem definition in nixpkgs.\n\nFor frameworks there are links between many frameworks. This is\nhandled by a two step process. In the definition of these stubs, the\nframework path of re-exports is rewritten from\n`/System/Library/SomeFramework.framework` to\n`@SomeFramework@/Library/SomeFramework.framework`. When assembling the\nframeworks for `darwin.apple_sdk.frameworks`, nixpkgs uses\n`substituteInPlace --subst-var-by SomeFramework /nix/store/...` to\nprovide dependencies. To ensure correctness, the builder checks that\neach re-exported file actually exists.\n\n[1]: https://reviews.llvm.org/D4409#56025\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixos%2Fdarwin-stubs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixos%2Fdarwin-stubs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixos%2Fdarwin-stubs/lists"}