Files
Randy Eckenrode b00e2f3bc5 darwin.sourceRelease: add
This function replaces `apple-sdk.sourceRelease`. It is not
SDK-specific, but going forward the source releases will be updated
together, build with their associated SDK, and rely on cc-wrapper’s
support for enforcing availability annotations to ensure they still
build and run on all supported versions of macOS.
2026-04-18 00:39:05 -04:00

26 lines
618 B
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Returns the raw source from apple-oss-distributions repo.
# This is mostly useful for copying private headers needed to build other source releases.
#
# Note: The source releases are mostly not used to build the SDK. Unless they can be used to build binaries,
# theyre not used.
let
lockfile = builtins.fromJSON (builtins.readFile ./versions.json);
in
{ fetchFromGitHub }:
name:
let
lockinfo = lockfile.${name};
in
fetchFromGitHub {
owner = "apple-oss-distributions";
repo = name;
rev = lockinfo.rev or "${name}-${lockinfo.version}";
inherit (lockinfo) hash;
}
// {
inherit (lockinfo) version;
}