From b00e2f3bc505f2d2de6314057b85356b5eb5ab59 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 01/22] darwin.sourceRelease: add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../darwin/sourceRelease/default.nix | 25 ++ .../sourceRelease/update-source-releases.sh | 138 +++++++++ .../darwin/sourceRelease/versions.json | 282 ++++++++++++++++++ pkgs/top-level/darwin-packages.nix | 2 + 4 files changed, 447 insertions(+) create mode 100644 pkgs/os-specific/darwin/sourceRelease/default.nix create mode 100755 pkgs/os-specific/darwin/sourceRelease/update-source-releases.sh create mode 100644 pkgs/os-specific/darwin/sourceRelease/versions.json diff --git a/pkgs/os-specific/darwin/sourceRelease/default.nix b/pkgs/os-specific/darwin/sourceRelease/default.nix new file mode 100644 index 000000000000..1006db4c465f --- /dev/null +++ b/pkgs/os-specific/darwin/sourceRelease/default.nix @@ -0,0 +1,25 @@ +# 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, +# they’re 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; +} diff --git a/pkgs/os-specific/darwin/sourceRelease/update-source-releases.sh b/pkgs/os-specific/darwin/sourceRelease/update-source-releases.sh new file mode 100755 index 000000000000..8e416bfc3483 --- /dev/null +++ b/pkgs/os-specific/darwin/sourceRelease/update-source-releases.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p coreutils curl git gnutar jq moreutils nix + +set -eu -o pipefail + +if [ ! -v 1 ]; then + echo "usage: update-source-releases.sh " >&2 + echo " Decimal-separated version number." >&2 + echo " Must correspond to a tag in https://github.com/apple-oss-distributions/distribution-macOS" >&2 + exit 1 +fi + +pkgdir=$(dirname "$(realpath "$0")") + +lockfile=$pkgdir/versions.json +if [ -e "$lockfile" ]; then + echo '{}' > "$lockfile" +fi + +workdir=$(mktemp -d) +trap 'rm -rf -- "$workdir"' EXIT + +sdkVersion=$1; shift +tag="macos-${sdkVersion//.}" + +declare -a packages=( + AvailabilityVersions + CarbonHeaders + CommonCrypto + Csu + ICU + IOAudioFamily + IOBDStorageFamily + IOCDStorageFamily + IODVDStorageFamily + IOFWDVComponents + IOFireWireAVC + IOFireWireFamily + IOFireWireSBP2 + IOFireWireSerialBusProtocolTransport + IOGraphics + IOHIDFamily + IOKitTools + IOKitUser + IONetworkingFamily + IOSerialFamily + IOStorageFamily + IOUSBFamily + Libc + Libinfo + Libm + Libnotify + Librpcsvc + Libsystem + OpenDirectory + PowerManagement + Security + adv_cmds + architecture + basic_cmds + bootstrap_cmds + configd + copyfile + developer_cmds + diskdev_cmds + doc_cmds + dtrace + dyld + eap8021x + file_cmds + hfs + launchd + libclosure + libdispatch + libffi + libiconv + libmalloc + libpcap + libplatform + libpthread + libresolv + libutil + mDNSResponder + mail_cmds + misc_cmds + network_cmds + objc4 + patch_cmds + ppp + remote_cmds + removefile + shell_cmds + system_cmds + text_cmds + top + xnu +) + +echo "Locking versions for macOS $sdkVersion using tag '$tag'..." + +pushd "$workdir" > /dev/null + +git clone --branch "$tag" https://github.com/apple-oss-distributions/distribution-macOS.git &> /dev/null +cd distribution-macOS + +for package in "${packages[@]}"; do + # If the tag exists in `release.json`, use that as an optimization to avoid downloading unnecessarily from Github. + packageTag=$(jq -r --arg package "$package" '.projects[] | select(.project == $package) | .tag' release.json) + packageCommit=$(git ls-tree -d HEAD "$package" | awk '{print $3}') + + if [ ! -d "$package" ]; then + packageCommit=HEAD + fi + + # However, sometimes it doesn’t exist. In that case, fall back to cloning the repo and check manually + # which tag corresponds to the commit from the submodule. + if [ -z "$packageTag" ]; then + git clone --no-checkout "https://github.com/apple-oss-distributions/$package.git" ../source &> /dev/null + pushd ../source > /dev/null + packageTag=$(git tag --points-at "$packageCommit") + popd > /dev/null + rm -rf ../source + fi + + packageVersion=${packageTag##"$package"-} + + curl -OL "https://github.com/apple-oss-distributions/$package/archive/$packageTag.tar.gz" &> /dev/null + tar axf "$packageTag.tar.gz" + + packageHash=$(nix --extra-experimental-features nix-command hash path "$package-$packageTag") + + pkgsjson="{\"$package\": {\"version\": \"$packageVersion\", \"hash\": \"$packageHash\"}}" + + echo " - Locking $package to version $packageVersion with hash '$packageHash'" + jq --argjson pkg "$pkgsjson" -S '. * $pkg' "$lockfile" | sponge "$lockfile" +done + +popd > /dev/null diff --git a/pkgs/os-specific/darwin/sourceRelease/versions.json b/pkgs/os-specific/darwin/sourceRelease/versions.json new file mode 100644 index 000000000000..cc0231d6ccbc --- /dev/null +++ b/pkgs/os-specific/darwin/sourceRelease/versions.json @@ -0,0 +1,282 @@ +{ + "AvailabilityVersions": { + "hash": "sha256-eQ46qHk4AuHA+hRZq1IG2UtvZr/X2vtlOvi6hnG+FyA=", + "version": "151" + }, + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-/VoOR9wJuKnmGE1CWGGXxX8SpmALHnEooNTa3QM+ITc=", + "version": "600028.100.1" + }, + "Csu": { + "hash": "sha256-l8RI8aiin7ovZuoDh54thDmd/b502w+dtjN5ZoISZBg=", + "version": "88" + }, + "ICU": { + "hash": "sha256-dIgrTjHcQm8dy2Ku5wNIHuPjHfoV+48TM0PNDDn6ZPk=", + "version": "76104.4" + }, + "IOAudioFamily": { + "hash": "sha256-VSk3jvsITJugtL67Qt0m4qJ879i7Fj6B/NGBFVCwpiU=", + "version": "540.3" + }, + "IOBDStorageFamily": { + "hash": "sha256-UgLMsQBe1QLzlbScmPmASBN7VH4YBmNOUX2CEDezjmE=", + "version": "22" + }, + "IOCDStorageFamily": { + "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", + "version": "61" + }, + "IODVDStorageFamily": { + "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", + "version": "45" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-IUytBKhhCgg0vtI+7q8d5kxpOUgO3tQD7TMy++jrorc=", + "version": "431" + }, + "IOFireWireFamily": { + "hash": "sha256-W0KOF4hkA7kFOnL1ThAeFU/YlhFVqoqk9uzGjcBppX8=", + "version": "487" + }, + "IOFireWireSBP2": { + "hash": "sha256-bItnRQIaGUxMyiU0q+4N8e5+jYiDEOUPmsrKhBFXvok=", + "version": "445" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-P7egeaD9SSa+YyrIRzM44gILKbIL7vezXK3M6q3MBOI=", + "version": "260" + }, + "IOGraphics": { + "hash": "sha256-Ag37fd3tZJLXLVq1yzHOCWGOYYfwwTkC8hnvNaTEaWg=", + "version": "598" + }, + "IOHIDFamily": { + "hash": "sha256-fmYTJsquAOBwzsgRmqPyjSJJi1hGcfnMmqLIcTe8W1s=", + "version": "2031.100.16" + }, + "IOKitTools": { + "hash": "sha256-Oknsvzn4nv77WU7f0WPS446iwR2BM2q4iw46r/qctAE=", + "version": "125" + }, + "IOKitUser": { + "hash": "sha256-1bqRiLvyr2GQfbWwhXHXXIOtIka9YDw5GbKV6bd2k4k=", + "version": "100076.101.1" + }, + "IONetworkingFamily": { + "hash": "sha256-J3cLeWKrQ8ypIaqgwRH9eU5JbjEDBVoezj3a2Lvwu5k=", + "version": "177" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-cllpJX11c3CX8zEYdOT2TC63sx7NUAHh33yRHhrG2Ro=", + "version": "315" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-fxBM4KbPwQNVEJl7PCKP+1nUk9Oce/O2+0lVBxyngew=", + "version": "1592.100.35" + }, + "Libinfo": { + "hash": "sha256-zZr6Mmou8Q+G6/wS+k0k7R+XirB94TNCUGS5dhi96ZE=", + "version": "583.0.1" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-7X+6S3C7ZOTXJUeDXOOg5EmoZyLZvtE06x3Is0TGgSU=", + "version": "317.100.2" + }, + "Librpcsvc": { + "hash": "sha256-UWYdCQ9QsBqwM01bWr+igINAHSdSluB/FrOclC5AjTI=", + "version": "31" + }, + "Libsystem": { + "hash": "sha256-HsItciWrwyXujQ2hwqzv0JKOkkuynXYIqejLAEPJbMc=", + "version": "1345.100.2" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "PowerManagement": { + "hash": "sha256-ssg655SPT7gWnJWDaxambMKCopr+vLPYERW0IMKT0T8=", + "version": "1754.140.4" + }, + "Security": { + "hash": "sha256-NgTGbaw5JkpboDQpt1fSgUr9NYGS+bIOrEMQX7mLAME=", + "version": "61123.100.169" + }, + "adv_cmds": { + "hash": "sha256-O+SB8sj3yqPv7GEBQQgvq+Y7kQRZI/i/UVa17J/OhZM=", + "version": "235" + }, + "architecture": { + "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", + "version": "282" + }, + "basic_cmds": { + "hash": "sha256-RQve2GqS9ke9hd8kupRMgoOKalTS229asi5tBGrBmS8=", + "version": "70" + }, + "bootstrap_cmds": { + "hash": "sha256-6JG0sysgqLlgcpIOXfN+F0/gxpIIHZZ5et3gmDBoBGQ=", + "version": "138" + }, + "configd": { + "hash": "sha256-+3xesYxqfsNjWCW3T87OA7+Z1hBqmGEh/I8kP8Ajbso=", + "version": "1300.100.9" + }, + "copyfile": { + "hash": "sha256-hIHlY0prIFY0j8z0Hvlv2psrwLj41jYfKBM0KutLxew=", + "version": "224" + }, + "developer_cmds": { + "hash": "sha256-jgQUjN9zmqi0/7XpqzbRsJjZIYeMrxXT1Zf3qi7+o+8=", + "version": "83" + }, + "diskdev_cmds": { + "hash": "sha256-TD/sJkzIquTgq1zP/B7eBArxeTcp1Lqa8e8cJ1jnkHU=", + "version": "737.140.4" + }, + "doc_cmds": { + "hash": "sha256-nnwKXKKjgJXcLCArD38Dme2L1WyR1U0rwn7zI+NCftw=", + "version": "69" + }, + "dtrace": { + "hash": "sha256-04Q35rCKnM5Csv5poFJKpK0VplWq4hvy251/Cb2Kl80=", + "version": "401.100.3" + }, + "dyld": { + "hash": "sha256-pbpSD5OeSMOcMJFAd7kyLINPROjqsafsCSphVGyIPyg=", + "version": "1286.10" + }, + "eap8021x": { + "hash": "sha256-Ky6KSlJhyX1NRufGhVBcp+ZFmqYrAxwC/5QvJhC2PhU=", + "version": "354.100.3" + }, + "file_cmds": { + "hash": "sha256-Rf/XA6uEaj7Wps2s8Oc/OhQVBjz8XiqJlj+cxjiQfQU=", + "version": "457.140.3" + }, + "hfs": { + "hash": "sha256-+YUVOttZU7C8I14CC6t3ZH2KxAjjTA2nB0y5bPgLxZM=", + "version": "650.0.2" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-M/jnIHzKYvdFCO0tJ1JXiD/UcZtJhLIoulaCQQUbn30=", + "version": "90" + }, + "libdispatch": { + "hash": "sha256-igqIA5DMVHjG30WMHZZpYY7LRM9hZyMWItD+UxeTehY=", + "version": "1477.100.9" + }, + "libffi": { + "hash": "sha256-xHefZVsZg9kUXV0t/HLdjPkkD/hn/4bvdRVJ4PsQLeM=", + "version": "40" + }, + "libiconv": { + "hash": "sha256-50DC6LePtvdAh9FLa/esiwCUmYDxKofN6hCiv9+dmgQ=", + "version": "109.100.2" + }, + "libmalloc": { + "hash": "sha256-Sh4/z7lGWRMldOPURkP5vLOAb5Ou6AUsVJEWz9wk9hI=", + "version": "521.100.59" + }, + "libpcap": { + "hash": "sha256-DqINoombdui5N6lNHcZ07c7LrVum4f8fFK89ymdCd0c=", + "version": "140" + }, + "libplatform": { + "hash": "sha256-gojt3sWOr7XO2yYI/B1CmNLTPFieSfoNtlOgQahOCok=", + "version": "316.100.10" + }, + "libpthread": { + "hash": "sha256-phjfN8+IU8ibPsflR6LktnSi3giy89ghI+cFyrhiQNo=", + "version": "519.101.1" + }, + "libresolv": { + "hash": "sha256-GtPVlL1mD58um5hOFd3HQKQ7pqutBe9jZKgQw8pOkPE=", + "version": "91" + }, + "libutil": { + "hash": "sha256-tUsl22Z0HUVSkSoohFXkhicNFCW+RARvpTS0q6yaQFk=", + "version": "72" + }, + "mDNSResponder": { + "hash": "sha256-0ECbWeMnIRTsi03BeBEe5boyR/84JJPbxzPQze8hHSA=", + "version": "2200.100.94.0.2" + }, + "mail_cmds": { + "hash": "sha256-ET1nga9nwgBtN7fuvsPs1yqe5OhQ62PVl7LxqbsAPqU=", + "version": "38.0.1" + }, + "misc_cmds": { + "hash": "sha256-04uBS16nNrg73Fqh4Obev7nQDjTTlY4f5+pEv3i0FIU=", + "version": "45" + }, + "network_cmds": { + "hash": "sha256-sfZX6aA8mspfRKARIYFXX+bmlLHDoi485HQOvbRNP1Y=", + "version": "705.100.5" + }, + "objc4": { + "hash": "sha256-eUVSpbyTEOMEdHoxSv6lZIZwB+cW/YWIaTZTcHgGOjo=", + "version": "912.3" + }, + "patch_cmds": { + "hash": "sha256-fDY2NOT3DnU5pm06cHSs+JJcA/EFP8Lxjg7sErUerJ0=", + "version": "72" + }, + "ppp": { + "hash": "sha256-8+QUA79sHf85yvGSPE9qCmGsrZDT3NZnbgZVroJw/Hg=", + "version": "1016" + }, + "remote_cmds": { + "hash": "sha256-8c/NgQZ+K6jJ3aoYK78/BsEkM1gmRS+9z0437+SvcCw=", + "version": "306" + }, + "removefile": { + "hash": "sha256-Z5UD0mk/s80CQB0PZWDzSl2JWXmnVmwUvlNb28+hR3k=", + "version": "81" + }, + "shell_cmds": { + "hash": "sha256-hoMssbZCrmzyJTgEAzOS4L7DhY9z/yXIcvHRhL6W5qc=", + "version": "326" + }, + "system_cmds": { + "hash": "sha256-mEo+v0m+aP42XHHwibGKPkT55JFYLTOD5YT5IYQ8Hr0=", + "version": "1026.140.2" + }, + "text_cmds": { + "hash": "sha256-5BBH/v1mJpExz65VDX6oh3dFCz49E+JMqJxkO96Y/xo=", + "version": "195" + }, + "top": { + "hash": "sha256-e+k/jE49BMZZ24ge9JCa2ct5f1og6ewWb6U5ZMWdIEc=", + "version": "139.40.2" + }, + "xnu": { + "hash": "sha256-j5Ep1RX5DTJqTGszrF4d/JtzUqZ6nA6XoExqcIQ0RVQ=", + "version": "10063.101.15" + } +} diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 51680985fa64..fa9b60790eff 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -95,6 +95,8 @@ makeScopeWithSplicing' { bintools = self.binutilsDualAs-unwrapped; }; + sourceRelease = self.callPackage ../os-specific/darwin/sourceRelease { }; + inherit (self.file_cmds) xattr; # Note: Not in `packages.nix` because it’s a package set not a derivation. From e3e8c0c2cf42fd4e7f71b66287192a3588c2543d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 02/22] darwin.mkAppleDerivation: migrate to use darwin.sourceRelease --- .../darwin/mk-apple-derivation/default.nix | 17 +-- .../update-source-releases.sh | 80 ------------ .../darwin/mk-apple-derivation/versions.json | 118 ------------------ 3 files changed, 4 insertions(+), 211 deletions(-) delete mode 100755 pkgs/os-specific/darwin/mk-apple-derivation/update-source-releases.sh delete mode 100644 pkgs/os-specific/darwin/mk-apple-derivation/versions.json diff --git a/pkgs/os-specific/darwin/mk-apple-derivation/default.nix b/pkgs/os-specific/darwin/mk-apple-derivation/default.nix index cb06f5d639c6..9bd230eee5e9 100644 --- a/pkgs/os-specific/darwin/mk-apple-derivation/default.nix +++ b/pkgs/os-specific/darwin/mk-apple-derivation/default.nix @@ -1,13 +1,9 @@ -let - versions = builtins.fromJSON (builtins.readFile ./versions.json); -in - { lib, bootstrapStdenv, - fetchFromGitHub, meson, ninja, + sourceRelease, xcodeProjectCheckHook, }: @@ -31,7 +27,7 @@ lib.extendMkDerivation { assert args ? releaseName; let inherit (args) releaseName; - info = versions.${releaseName}; + releaseSrc = sourceRelease releaseName; files = lib.filesystem.listFilesRecursive (prependShardPath releaseName); mesonFiles = lib.filter (hasBasenamePrefix "meson") files; in @@ -40,14 +36,9 @@ lib.extendMkDerivation { assert args ? xcodeHash -> lib.length mesonFiles > 0; { pname = args.pname or releaseName; - inherit (info) version; + inherit (releaseSrc) version; - src = args.src or fetchFromGitHub { - owner = "apple-oss-distributions"; - repo = releaseName; - rev = info.rev or "${releaseName}-${info.version}"; - inherit (info) hash; - }; + src = args.src or releaseSrc; strictDeps = true; __structuredAttrs = true; diff --git a/pkgs/os-specific/darwin/mk-apple-derivation/update-source-releases.sh b/pkgs/os-specific/darwin/mk-apple-derivation/update-source-releases.sh deleted file mode 100755 index aa852d125a0d..000000000000 --- a/pkgs/os-specific/darwin/mk-apple-derivation/update-source-releases.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p coreutils curl git gnutar jq moreutils nix - -set -eu -o pipefail - -if [ ! -v 1 ]; then - echo "usage: lock-sdk-deps.sh " >&2 - echo " Decimal-separated version number." >&2 - echo " Must correspond to a tag in https://github.com/apple-oss-distributions/distribution-macOS" >&2 - exit 1 -fi - -pkgdir=$(dirname "$(realpath "$0")") - -lockfile=$pkgdir/versions.json -if [ -e "$lockfile" ]; then - echo '{}' > "$lockfile" -fi - -workdir=$(mktemp -d) -trap 'rm -rf -- "$workdir"' EXIT - -sdkVersion=$1; shift -tag="macos-${sdkVersion//.}" - -declare -A ignoredPackages=( - [libsbuf]=1 - [locale]=1 - [mkAppleDerivation]=1 - [update-source-releases.sh]=1 - [versions.json]=1 -) - -readarray -t packages < <( - for file in "$pkgdir"/*; do - pkg=$(basename "$file" ".nix") - test ! "${ignoredPackages[$pkg]-}" && echo "$pkg" - done -) - -echo "Locking versions for macOS $sdkVersion using tag '$tag'..." - -pushd "$workdir" > /dev/null - -git clone --branch "$tag" https://github.com/apple-oss-distributions/distribution-macOS.git &> /dev/null -cd distribution-macOS - -for package in "${packages[@]}"; do - # If the tag exists in `release.json`, use that as an optimization to avoid downloading unnecessarily from Github. - packageTag=$(jq -r --arg package "$package" '.projects[] | select(.project == $package) | .tag' release.json) - packageCommit=$(git ls-tree -d HEAD "$package" | awk '{print $3}') - - if [ ! -d "$package" ]; then - packageCommit=HEAD - fi - - # However, sometimes it doesn’t exist. In that case, fall back to cloning the repo and check manually - # which tag corresponds to the commit from the submodule. - if [ -z "$packageTag" ]; then - git clone --no-checkout "https://github.com/apple-oss-distributions/$package.git" ../source &> /dev/null - pushd ../source > /dev/null - packageTag=$(git tag --points-at "$packageCommit") - popd > /dev/null - rm -rf ../source - fi - - packageVersion=${packageTag##"$package"-} - - curl -OL "https://github.com/apple-oss-distributions/$package/archive/$packageTag.tar.gz" &> /dev/null - tar axf "$packageTag.tar.gz" - - packageHash=$(nix --extra-experimental-features nix-command hash path "$package-$packageTag") - - pkgsjson="{\"$package\": {\"version\": \"$packageVersion\", \"hash\": \"$packageHash\"}}" - - echo " - Locking $package to version $packageVersion with hash '$packageHash'" - jq --argjson pkg "$pkgsjson" -S '. * $pkg' "$lockfile" | sponge "$lockfile" -done - -popd > /dev/null diff --git a/pkgs/os-specific/darwin/mk-apple-derivation/versions.json b/pkgs/os-specific/darwin/mk-apple-derivation/versions.json deleted file mode 100644 index a80d604e2b83..000000000000 --- a/pkgs/os-specific/darwin/mk-apple-derivation/versions.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "AvailabilityVersions": { - "hash": "sha256-eQ46qHk4AuHA+hRZq1IG2UtvZr/X2vtlOvi6hnG+FyA=", - "version": "151" - }, - "Csu": { - "hash": "sha256-l8RI8aiin7ovZuoDh54thDmd/b502w+dtjN5ZoISZBg=", - "version": "88" - }, - "ICU": { - "hash": "sha256-dIgrTjHcQm8dy2Ku5wNIHuPjHfoV+48TM0PNDDn6ZPk=", - "version": "76104.4" - }, - "IOKitTools": { - "hash": "sha256-Oknsvzn4nv77WU7f0WPS446iwR2BM2q4iw46r/qctAE=", - "version": "125" - }, - "PowerManagement": { - "hash": "sha256-ssg655SPT7gWnJWDaxambMKCopr+vLPYERW0IMKT0T8=", - "version": "1754.140.4" - }, - "adv_cmds": { - "hash": "sha256-O+SB8sj3yqPv7GEBQQgvq+Y7kQRZI/i/UVa17J/OhZM=", - "version": "235" - }, - "basic_cmds": { - "hash": "sha256-RQve2GqS9ke9hd8kupRMgoOKalTS229asi5tBGrBmS8=", - "version": "70" - }, - "bootstrap_cmds": { - "hash": "sha256-6JG0sysgqLlgcpIOXfN+F0/gxpIIHZZ5et3gmDBoBGQ=", - "version": "138" - }, - "copyfile": { - "hash": "sha256-hIHlY0prIFY0j8z0Hvlv2psrwLj41jYfKBM0KutLxew=", - "version": "224" - }, - "developer_cmds": { - "hash": "sha256-jgQUjN9zmqi0/7XpqzbRsJjZIYeMrxXT1Zf3qi7+o+8=", - "version": "83" - }, - "diskdev_cmds": { - "hash": "sha256-TD/sJkzIquTgq1zP/B7eBArxeTcp1Lqa8e8cJ1jnkHU=", - "version": "737.140.4" - }, - "doc_cmds": { - "hash": "sha256-nnwKXKKjgJXcLCArD38Dme2L1WyR1U0rwn7zI+NCftw=", - "version": "69" - }, - "dyld": { - "hash": "sha256-pbpSD5OeSMOcMJFAd7kyLINPROjqsafsCSphVGyIPyg=", - "version": "1286.10" - }, - "file_cmds": { - "hash": "sha256-Rf/XA6uEaj7Wps2s8Oc/OhQVBjz8XiqJlj+cxjiQfQU=", - "version": "457.140.3" - }, - "libffi": { - "hash": "sha256-xHefZVsZg9kUXV0t/HLdjPkkD/hn/4bvdRVJ4PsQLeM=", - "version": "40" - }, - "libiconv": { - "hash": "sha256-50DC6LePtvdAh9FLa/esiwCUmYDxKofN6hCiv9+dmgQ=", - "version": "109.100.2" - }, - "libpcap": { - "hash": "sha256-DqINoombdui5N6lNHcZ07c7LrVum4f8fFK89ymdCd0c=", - "version": "140" - }, - "libresolv": { - "hash": "sha256-GtPVlL1mD58um5hOFd3HQKQ7pqutBe9jZKgQw8pOkPE=", - "version": "91" - }, - "libutil": { - "hash": "sha256-tUsl22Z0HUVSkSoohFXkhicNFCW+RARvpTS0q6yaQFk=", - "version": "72" - }, - "mail_cmds": { - "hash": "sha256-ET1nga9nwgBtN7fuvsPs1yqe5OhQ62PVl7LxqbsAPqU=", - "version": "38.0.1" - }, - "misc_cmds": { - "hash": "sha256-04uBS16nNrg73Fqh4Obev7nQDjTTlY4f5+pEv3i0FIU=", - "version": "45" - }, - "network_cmds": { - "hash": "sha256-sfZX6aA8mspfRKARIYFXX+bmlLHDoi485HQOvbRNP1Y=", - "version": "705.100.5" - }, - "patch_cmds": { - "hash": "sha256-fDY2NOT3DnU5pm06cHSs+JJcA/EFP8Lxjg7sErUerJ0=", - "version": "72" - }, - "remote_cmds": { - "hash": "sha256-8c/NgQZ+K6jJ3aoYK78/BsEkM1gmRS+9z0437+SvcCw=", - "version": "306" - }, - "removefile": { - "hash": "sha256-Z5UD0mk/s80CQB0PZWDzSl2JWXmnVmwUvlNb28+hR3k=", - "version": "81" - }, - "shell_cmds": { - "hash": "sha256-hoMssbZCrmzyJTgEAzOS4L7DhY9z/yXIcvHRhL6W5qc=", - "version": "326" - }, - "system_cmds": { - "hash": "sha256-mEo+v0m+aP42XHHwibGKPkT55JFYLTOD5YT5IYQ8Hr0=", - "version": "1026.140.2" - }, - "text_cmds": { - "hash": "sha256-5BBH/v1mJpExz65VDX6oh3dFCz49E+JMqJxkO96Y/xo=", - "version": "195" - }, - "top": { - "hash": "sha256-e+k/jE49BMZZ24ge9JCa2ct5f1og6ewWb6U5ZMWdIEc=", - "version": "139.40.2" - } -} From f9f16e259f2a7a55e04103eb933656d83a3b48b1 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 03/22] darwin.adv_cmds: migrate to use darwin.sourceRelease --- pkgs/os-specific/darwin/by-name/ad/adv_cmds/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/ad/adv_cmds/package.nix b/pkgs/os-specific/darwin/by-name/ad/adv_cmds/package.nix index ba19dccc1284..5783a47e0433 100644 --- a/pkgs/os-specific/darwin/by-name/ad/adv_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/ad/adv_cmds/package.nix @@ -1,19 +1,19 @@ { lib, - apple-sdk, bison, flex, libxo, mkAppleDerivation, ncurses, pkg-config, + sourceRelease, stdenvNoCC, }: let - Libc = apple-sdk.sourceRelease "Libc"; - libplatform = apple-sdk.sourceRelease "libplatform"; - xnu = apple-sdk.sourceRelease "xnu"; + Libc = sourceRelease "Libc"; + libplatform = sourceRelease "libplatform"; + xnu = sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "adv_cmds-deps-private-headers"; From 7419370682914c14f2752179166aae6cfeed210d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 04/22] darwin.AvailabilityVersions: migrate to use darwin.sourceRelease --- .../by-name/av/AvailabilityVersions/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/av/AvailabilityVersions/package.nix b/pkgs/os-specific/darwin/by-name/av/AvailabilityVersions/package.nix index 8cd1ee632f2b..d0aa908a3b83 100644 --- a/pkgs/os-specific/darwin/by-name/av/AvailabilityVersions/package.nix +++ b/pkgs/os-specific/darwin/by-name/av/AvailabilityVersions/package.nix @@ -1,15 +1,23 @@ { lib, - apple-sdk, + bashNonInteractive, buildPackages, mkAppleDerivation, + pkgs, unifdef, - bashNonInteractive, }: let inherit (buildPackages) gnused python3; - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + xnu = bootstrapSourceRelease "xnu"; in mkAppleDerivation (finalAttrs: { releaseName = "AvailabilityVersions"; From 5d841aa494cb412598c52ef23714d70f401cd438 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 05/22] darwin.bootstrap_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/bo/bootstrap_cmds/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/bo/bootstrap_cmds/package.nix b/pkgs/os-specific/darwin/by-name/bo/bootstrap_cmds/package.nix index ca416bc65934..3d267ef6ae5a 100644 --- a/pkgs/os-specific/darwin/by-name/bo/bootstrap_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/bo/bootstrap_cmds/package.nix @@ -1,19 +1,27 @@ { lib, - apple-sdk, bison, buildPackages, flex, meson, mkAppleDerivation, + pkgs, replaceVars, stdenv, stdenvNoCC, }: let - Libc = apple-sdk.sourceRelease "Libc"; - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + Libc = bootstrapSourceRelease "Libc"; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "adv_cmds-deps-private-headers"; From 44fc4a5e8b45e321b8485608bd715c1ade55ae7d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 06/22] darwin.copyfile: migrate to use darwin.sourceRelease --- pkgs/os-specific/darwin/by-name/co/copyfile/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/co/copyfile/package.nix b/pkgs/os-specific/darwin/by-name/co/copyfile/package.nix index 413e6532b3a6..f76e5beaa766 100644 --- a/pkgs/os-specific/darwin/by-name/co/copyfile/package.nix +++ b/pkgs/os-specific/darwin/by-name/co/copyfile/package.nix @@ -1,12 +1,11 @@ { - lib, - apple-sdk, mkAppleDerivation, + sourceRelease, stdenvNoCC, }: let - xnu = apple-sdk.sourceRelease "xnu"; + xnu = sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "copyfile-deps-private-headers"; From 857b04c8ed9aa5e658b46e1ae05d19b2ed50d659 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 07/22] darwin.diskdev_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/di/diskdev_cmds/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/di/diskdev_cmds/package.nix b/pkgs/os-specific/darwin/by-name/di/diskdev_cmds/package.nix index edc71e50e868..d905e3617611 100644 --- a/pkgs/os-specific/darwin/by-name/di/diskdev_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/di/diskdev_cmds/package.nix @@ -1,15 +1,23 @@ { - lib, apple-sdk, libutil, mkAppleDerivation, removefile, + pkgs, stdenvNoCC, }: let - Libc = apple-sdk.sourceRelease "Libc"; - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + Libc = bootstrapSourceRelease "Libc"; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "diskdev_cmds-deps-private-headers"; From 4f980622d917566ddedce28bd654a7a63b618f38 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 08/22] darwin.doc_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/do/doc_cmds/package.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/do/doc_cmds/package.nix b/pkgs/os-specific/darwin/by-name/do/doc_cmds/package.nix index 493fabf82baf..d26a1a9f4b13 100644 --- a/pkgs/os-specific/darwin/by-name/do/doc_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/do/doc_cmds/package.nix @@ -1,15 +1,23 @@ { lib, - apple-sdk, mkAppleDerivation, pkg-config, shell_cmds, + pkgs, stdenvNoCC, zlib, }: let - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + bootstrapSourceRelease = f pkgs pkgs; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "doc_cmds-deps-private-headers"; From 7ad69515599cdf1ff41ba93965a24718eafe7d31 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 09/22] darwin.dyld: migrate to use darwin.sourceRelease --- .../darwin/by-name/dy/dyld/package.nix | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/dy/dyld/package.nix b/pkgs/os-specific/darwin/by-name/dy/dyld/package.nix index 8cc3eaa2071a..06c4aaedc5af 100644 --- a/pkgs/os-specific/darwin/by-name/dy/dyld/package.nix +++ b/pkgs/os-specific/darwin/by-name/dy/dyld/package.nix @@ -1,15 +1,15 @@ { lib, - apple-sdk, - ld64, - mkAppleDerivation, cmake, - llvm, - openssl, - pkgsBuildHost, - pkg-config, - stdenvNoCC, fetchurl, + ld64, + llvm, + mkAppleDerivation, + openssl, + pkg-config, + pkgsBuildHost, + pkgs, + stdenvNoCC, }: let @@ -20,11 +20,19 @@ let hash = "sha256-0ybVcwHuGEdThv0PPjYQc3SW0YVOyrM3/L9zG/l1Vtk="; }; - launchd = apple-sdk.sourceRelease "launchd"; - Libc = apple-sdk.sourceRelease "Libc"; - libplatform = apple-sdk.sourceRelease "libplatform"; - libpthread = apple-sdk.sourceRelease "libpthread"; - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + launchd = bootstrapSourceRelease "launchd"; + Libc = bootstrapSourceRelease "Libc"; + libplatform = bootstrapSourceRelease "libplatform"; + libpthread = bootstrapSourceRelease "libpthread"; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "dyld-deps-private-headers"; From 1fd34d3ed3aab86f1a7bb180d5a5a19c2be77232 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 10/22] darwin.file_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/fi/file_cmds/package.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/fi/file_cmds/package.nix b/pkgs/os-specific/darwin/by-name/fi/file_cmds/package.nix index 160a394b4ba7..1e6433c31098 100644 --- a/pkgs/os-specific/darwin/by-name/fi/file_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/fi/file_cmds/package.nix @@ -1,6 +1,5 @@ { lib, - apple-sdk, bzip2, copyfile, less, @@ -11,17 +10,26 @@ pkg-config, removefile, shell_cmds, + pkgs, stdenvNoCC, xz, zlib, }: let - Libc = apple-sdk.sourceRelease "Libc"; - Libinfo = apple-sdk.sourceRelease "Libinfo"; - CommonCrypto = apple-sdk.sourceRelease "CommonCrypto"; - libplatform = apple-sdk.sourceRelease "libplatform"; - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + Libc = bootstrapSourceRelease "Libc"; + Libinfo = bootstrapSourceRelease "Libinfo"; + CommonCrypto = bootstrapSourceRelease "CommonCrypto"; + libplatform = bootstrapSourceRelease "libplatform"; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "file_cmds-deps-private-headers"; From b4d105cafaee3e038dfe45affb293af23fe8ea14 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 11/22] darwin.IOKitTools: migrate to use darwin.sourceRelease --- .../darwin/by-name/io/IOKitTools/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/io/IOKitTools/package.nix b/pkgs/os-specific/darwin/by-name/io/IOKitTools/package.nix index 7d3077b10e4e..ea0ae1c12795 100644 --- a/pkgs/os-specific/darwin/by-name/io/IOKitTools/package.nix +++ b/pkgs/os-specific/darwin/by-name/io/IOKitTools/package.nix @@ -1,15 +1,23 @@ { - lib, apple-sdk, mkAppleDerivation, ncurses, pkg-config, + pkgs, stdenvNoCC, }: let - iokitUser = apple-sdk.sourceRelease "IOKitUser"; - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + iokitUser = bootstrapSourceRelease "IOKitUser"; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "IOKitTools-deps-private-headers"; From 9cd197eb1dafde832d67ce62c156c7115325c00a Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 12/22] darwin.libpcap: migrate to use darwin.sourceRelease --- pkgs/os-specific/darwin/by-name/li/libpcap/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/li/libpcap/package.nix b/pkgs/os-specific/darwin/by-name/li/libpcap/package.nix index 2fbff68ebfbe..54e10ca22739 100644 --- a/pkgs/os-specific/darwin/by-name/li/libpcap/package.nix +++ b/pkgs/os-specific/darwin/by-name/li/libpcap/package.nix @@ -1,8 +1,8 @@ { lib, - apple-sdk_15, bison, bluez, + fetchFromGitHub, flex, mkAppleDerivation, stdenv, @@ -14,7 +14,13 @@ }: let - xnu = apple-sdk_15.sourceRelease "xnu"; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + xnu = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "xnu"; + rev = "xnu-11417.121.6"; + hash = "sha256-o4tCuCAIgAYg/Li3wTs12mVWr5C/4vbwu1zi+kJ9d6w="; + }; privateHeaders = stdenvNoCC.mkDerivation { name = "libpcap-deps-private-headers"; From d284d13f1cc6766d246c1cc19cf7bbb97e9ea36d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 13/22] darwin.libresolv: migrate to use darwin.sourceRelease --- .../darwin/by-name/li/libresolv/package.nix | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/li/libresolv/package.nix b/pkgs/os-specific/darwin/by-name/li/libresolv/package.nix index 56c38bcece53..1ff3f3b70474 100644 --- a/pkgs/os-specific/darwin/by-name/li/libresolv/package.nix +++ b/pkgs/os-specific/darwin/by-name/li/libresolv/package.nix @@ -1,19 +1,25 @@ { lib, - apple-sdk, + fetchFromGitHub, mkAppleDerivation, + sourceRelease, stdenvNoCC, }: let - configd = apple-sdk.sourceRelease "configd"; - dyld = apple-sdk.sourceRelease "dyld"; - Libinfo = apple-sdk.sourceRelease "Libinfo"; - Libnotify = apple-sdk.sourceRelease "Libnotify"; - xnu = apple-sdk.sourceRelease "xnu"; + configd = sourceRelease "configd"; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + dyld = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "dyld"; + rev = "dyld-1160.6"; + hash = "sha256-6P/Da6xP19vmaCROoYv9pl7DaW3/U+qZBJT8PD33bn0="; + }; + Libinfo = sourceRelease "Libinfo"; + Libnotify = sourceRelease "Libnotify"; # `arpa/nameser_compat.h` is included in the Libc source release instead of libresolv. - Libc = apple-sdk.sourceRelease "Libc"; + Libc = sourceRelease "Libc"; privateHeaders = stdenvNoCC.mkDerivation { name = "libresolv-deps-private-headers"; From b117fd0320ddf2719966cad3b75d409bfc71cf77 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 14/22] darwin.network_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/ne/network_cmds/package.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/ne/network_cmds/package.nix b/pkgs/os-specific/darwin/by-name/ne/network_cmds/package.nix index ec9d4c32ca1f..fcc585842573 100644 --- a/pkgs/os-specific/darwin/by-name/ne/network_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/ne/network_cmds/package.nix @@ -1,7 +1,5 @@ { - lib, - apple-sdk_15, - fetchurl, + fetchFromGitHub, libpcap, libresolv, libutil, @@ -13,7 +11,13 @@ }: let - xnu = apple-sdk_15.sourceRelease "xnu"; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + xnu = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "xnu"; + rev = "xnu-11417.121.6"; + hash = "sha256-o4tCuCAIgAYg/Li3wTs12mVWr5C/4vbwu1zi+kJ9d6w="; + }; privateHeaders = stdenvNoCC.mkDerivation { name = "network_cmds-deps-private-headers"; From 930108f0bbe7dfabaeb862dee7ff1c1987eba930 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 15/22] darwin.PowerManagement: migrate to use darwin.sourceRelease --- .../darwin/by-name/po/PowerManagement/package.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/po/PowerManagement/package.nix b/pkgs/os-specific/darwin/by-name/po/PowerManagement/package.nix index f846f1aebc27..6c3883ed969a 100644 --- a/pkgs/os-specific/darwin/by-name/po/PowerManagement/package.nix +++ b/pkgs/os-specific/darwin/by-name/po/PowerManagement/package.nix @@ -1,12 +1,19 @@ { - lib, - apple-sdk, mkAppleDerivation, + pkgs, stdenvNoCC, }: let - iokitUser = apple-sdk.sourceRelease "IOKitUser"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + iokitUser = bootstrapSourceRelease "IOKitUser"; privateHeaders = stdenvNoCC.mkDerivation { name = "file_cmds-deps-private-headers"; From 03b82c06f1a28f7d4a337ac872e9f2dc93d4cc25 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 16/22] darwin.removefile: migrate to use darwin.sourceRelease --- pkgs/os-specific/darwin/by-name/re/removefile/package.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/re/removefile/package.nix b/pkgs/os-specific/darwin/by-name/re/removefile/package.nix index 2ece68a526a2..ceec34652880 100644 --- a/pkgs/os-specific/darwin/by-name/re/removefile/package.nix +++ b/pkgs/os-specific/darwin/by-name/re/removefile/package.nix @@ -1,12 +1,9 @@ { - apple-sdk, mkAppleDerivation, stdenvNoCC, }: let - xnu = apple-sdk.sourceRelease "xnu"; - privateHeaders = stdenvNoCC.mkDerivation { name = "removefile-deps-private-headers"; From 895f2f48cd19167f5d86b76cade2e0dda5064802 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 17/22] darwin.shell_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/sh/shell_cmds/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/sh/shell_cmds/package.nix b/pkgs/os-specific/darwin/by-name/sh/shell_cmds/package.nix index c8a305b61baa..ba35d58c481f 100644 --- a/pkgs/os-specific/darwin/by-name/sh/shell_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/sh/shell_cmds/package.nix @@ -1,6 +1,5 @@ { lib, - apple-sdk, bison, clang, libedit, @@ -8,13 +7,22 @@ libsbuf, libutil, libxo, - pkg-config, mkAppleDerivation, + pkg-config, + pkgs, }: let + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. # nohup requires vproc_priv.h from launchd - launchd = apple-sdk.sourceRelease "launchd"; + launchd = bootstrapSourceRelease "launchd"; in mkAppleDerivation { releaseName = "shell_cmds"; From 40792f5021c544e09f6f183de1caa750edd62858 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 18/22] darwin.system_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/sy/system_cmds/package.nix | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/sy/system_cmds/package.nix b/pkgs/os-specific/darwin/by-name/sy/system_cmds/package.nix index 934213c73bd0..28ca1c48c8c3 100644 --- a/pkgs/os-specific/darwin/by-name/sy/system_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/sy/system_cmds/package.nix @@ -2,25 +2,36 @@ lib, AvailabilityVersions, apple-sdk, - apple-sdk_15, + fetchFromGitHub, libutil, mkAppleDerivation, ncurses, openpam, pkg-config, + sourceRelease, stdenv, stdenvNoCC, }: let - libdispatch = apple-sdk.sourceRelease "libdispatch"; # Has to match the version of the SDK + # TODO(reckenrode): Remove on after the `sourceRelease` migration has been merged. + # system_cmds does not actually require private libdispatch APIs. + libdispatch = sourceRelease "libdispatch"; # Has to match the version of the SDK - Libc = apple-sdk.sourceRelease "Libc"; - libmalloc = apple-sdk.sourceRelease "libmalloc"; - OpenDirectory = apple-sdk.sourceRelease "OpenDirectory"; + Libc = sourceRelease "Libc"; + libmalloc = sourceRelease "libmalloc"; + OpenDirectory = sourceRelease "OpenDirectory"; - libplatform = apple-sdk.sourceRelease "libplatform"; - xnu = apple-sdk_15.sourceRelease "xnu"; # Needed for `posix_spawn_secflag_options` + libplatform = sourceRelease "libplatform"; + + # Needed for `posix_spawn_secflag_options` + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + xnu = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "xnu"; + rev = "xnu-11417.121.6"; + hash = "sha256-o4tCuCAIgAYg/Li3wTs12mVWr5C/4vbwu1zi+kJ9d6w="; + }; privateHeaders = stdenvNoCC.mkDerivation { name = "system_cmds-deps-private-headers"; From 508e8f3b51bcaefe1392ba4d947c19b9963ffbcf Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 19/22] darwin.text_cmds: migrate to use darwin.sourceRelease --- .../darwin/by-name/te/text_cmds/package.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/te/text_cmds/package.nix b/pkgs/os-specific/darwin/by-name/te/text_cmds/package.nix index 6c71c21c1ee7..a8b44093a9a5 100644 --- a/pkgs/os-specific/darwin/by-name/te/text_cmds/package.nix +++ b/pkgs/os-specific/darwin/by-name/te/text_cmds/package.nix @@ -1,6 +1,5 @@ { lib, - apple-sdk, bzip2, libmd, libresolv, @@ -10,17 +9,26 @@ ncurses, pkg-config, shell_cmds, + pkgs, stdenvNoCC, xz, zlib, }: let - Libc = apple-sdk.sourceRelease "Libc"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + Libc = bootstrapSourceRelease "Libc"; - CommonCrypto = apple-sdk.sourceRelease "CommonCrypto"; - libplatform = apple-sdk.sourceRelease "libplatform"; - xnu = apple-sdk.sourceRelease "xnu"; + CommonCrypto = bootstrapSourceRelease "CommonCrypto"; + libplatform = bootstrapSourceRelease "libplatform"; + xnu = bootstrapSourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "text_cmds-deps-private-headers"; From d40041864f11e70255613d0954cf6118b2f43462 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 20/22] darwin.top: migrate to use darwin.sourceRelease --- pkgs/os-specific/darwin/by-name/to/top/package.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/to/top/package.nix b/pkgs/os-specific/darwin/by-name/to/top/package.nix index 73977d799b5e..ef7e6efe9d0e 100644 --- a/pkgs/os-specific/darwin/by-name/to/top/package.nix +++ b/pkgs/os-specific/darwin/by-name/to/top/package.nix @@ -1,13 +1,21 @@ { - apple-sdk, libutil, mkAppleDerivation, ncurses, pkg-config, + pkgs, }: let - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + xnu = bootstrapSourceRelease "xnu"; in mkAppleDerivation { releaseName = "top"; From fdd34f1b2399ba9adf6b6f20f8cb57f13e88335d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 21/22] lsyncd: migrate to use darwin.sourceRelease --- pkgs/applications/networking/sync/lsyncd/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/lsyncd/default.nix b/pkgs/applications/networking/sync/lsyncd/default.nix index 41b163661cab..f28cbcb83196 100644 --- a/pkgs/applications/networking/sync/lsyncd/default.nix +++ b/pkgs/applications/networking/sync/lsyncd/default.nix @@ -11,11 +11,19 @@ docbook_xml_dtd_45, docbook_xsl, libxslt, - apple-sdk, + pkgs, }: let - xnu = apple-sdk.sourceRelease "xnu"; + f = + pkgs: prev: + if !pkgs.stdenv.hostPlatform.isDarwin || pkgs.stdenv.name == "bootstrap-stage0-stdenv-darwin" then + prev.darwin.sourceRelease + else + f pkgs.stdenv.__bootPackages pkgs; + bootstrapSourceRelease = f pkgs pkgs; + # TODO(reckenrode): Use `sourceRelease` after migration has been merged and all releases updated to the same version. + xnu = bootstrapSourceRelease "xnu"; in stdenv.mkDerivation rec { pname = "lsyncd"; From f6f50b0979d0593201b2e16537dab2447d102eeb Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 5 Apr 2026 19:46:47 -0400 Subject: [PATCH 22/22] apple-sdk.sourceRelease: make an alias of darwin.sourceRelease --- .../common/passthru-source-release-files.nix | 35 +- .../metadata/apple-oss-lockfile.json | 536 ------------------ pkgs/by-name/ap/apple-sdk/package.nix | 2 +- .../ap/apple-sdk/scripts/lock-sdk-deps.sh | 69 --- .../apple-sdk/scripts/regenerate-lockfile.sh | 62 -- 5 files changed, 6 insertions(+), 698 deletions(-) delete mode 100644 pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json delete mode 100755 pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh delete mode 100755 pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh diff --git a/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix b/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix index cf23ea7214bc..b4d2250c355a 100644 --- a/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix +++ b/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix @@ -1,37 +1,12 @@ -let - lockfile = builtins.fromJSON (builtins.readFile ../metadata/apple-oss-lockfile.json); -in +{ lib, darwin }: -{ - lib, - fetchFromGitHub, - stdenvNoCC, - sdkVersion, -}: - -let - sdkinfo = lockfile.${sdkVersion}; -in self: super: { passthru = super.passthru or { } // { - # 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, - # they’re not used. sourceRelease = name: - let - lockinfo = sdkinfo.${name}; - in - fetchFromGitHub { - owner = "apple-oss-distributions"; - repo = name; - rev = lockinfo.rev or "${name}-${lockinfo.version}"; - inherit (lockinfo) hash; - } - // { - inherit (lockinfo) version; - }; + lib.warn + "`apple-sdk.sourceRelease` is deprecated and is now an alias for `darwin.sourceRelease`. Please use `darwin.sourceRelease` directly." + darwin.sourceRelease + name; }; } diff --git a/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json b/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json deleted file mode 100644 index c67485419908..000000000000 --- a/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json +++ /dev/null @@ -1,536 +0,0 @@ -{ - "14.4": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-/VoOR9wJuKnmGE1CWGGXxX8SpmALHnEooNTa3QM+ITc=", - "version": "600028.100.1" - }, - "IOAudioFamily": { - "hash": "sha256-VSk3jvsITJugtL67Qt0m4qJ879i7Fj6B/NGBFVCwpiU=", - "version": "540.3" - }, - "IOBDStorageFamily": { - "hash": "sha256-UgLMsQBe1QLzlbScmPmASBN7VH4YBmNOUX2CEDezjmE=", - "version": "22" - }, - "IOCDStorageFamily": { - "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", - "version": "61" - }, - "IODVDStorageFamily": { - "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", - "version": "45" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-IUytBKhhCgg0vtI+7q8d5kxpOUgO3tQD7TMy++jrorc=", - "version": "431" - }, - "IOFireWireFamily": { - "hash": "sha256-W0KOF4hkA7kFOnL1ThAeFU/YlhFVqoqk9uzGjcBppX8=", - "version": "487" - }, - "IOFireWireSBP2": { - "hash": "sha256-bItnRQIaGUxMyiU0q+4N8e5+jYiDEOUPmsrKhBFXvok=", - "version": "445" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-P7egeaD9SSa+YyrIRzM44gILKbIL7vezXK3M6q3MBOI=", - "version": "260" - }, - "IOGraphics": { - "hash": "sha256-Ag37fd3tZJLXLVq1yzHOCWGOYYfwwTkC8hnvNaTEaWg=", - "version": "598" - }, - "IOHIDFamily": { - "hash": "sha256-fmYTJsquAOBwzsgRmqPyjSJJi1hGcfnMmqLIcTe8W1s=", - "version": "2031.100.16" - }, - "IOKitUser": { - "hash": "sha256-1bqRiLvyr2GQfbWwhXHXXIOtIka9YDw5GbKV6bd2k4k=", - "version": "100076.101.1" - }, - "IONetworkingFamily": { - "hash": "sha256-J3cLeWKrQ8ypIaqgwRH9eU5JbjEDBVoezj3a2Lvwu5k=", - "version": "177" - }, - "IOSerialFamily": { - "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", - "version": "93" - }, - "IOStorageFamily": { - "hash": "sha256-cllpJX11c3CX8zEYdOT2TC63sx7NUAHh33yRHhrG2Ro=", - "version": "315" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-fxBM4KbPwQNVEJl7PCKP+1nUk9Oce/O2+0lVBxyngew=", - "version": "1592.100.35" - }, - "Libinfo": { - "hash": "sha256-zZr6Mmou8Q+G6/wS+k0k7R+XirB94TNCUGS5dhi96ZE=", - "version": "583.0.1" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-7X+6S3C7ZOTXJUeDXOOg5EmoZyLZvtE06x3Is0TGgSU=", - "version": "317.100.2" - }, - "Librpcsvc": { - "hash": "sha256-UWYdCQ9QsBqwM01bWr+igINAHSdSluB/FrOclC5AjTI=", - "version": "31" - }, - "Libsystem": { - "hash": "sha256-HsItciWrwyXujQ2hwqzv0JKOkkuynXYIqejLAEPJbMc=", - "version": "1345.100.2" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-NgTGbaw5JkpboDQpt1fSgUr9NYGS+bIOrEMQX7mLAME=", - "version": "61123.100.169" - }, - "architecture": { - "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", - "version": "282" - }, - "configd": { - "hash": "sha256-+3xesYxqfsNjWCW3T87OA7+Z1hBqmGEh/I8kP8Ajbso=", - "version": "1300.100.9" - }, - "copyfile": { - "hash": "sha256-rSCTgzdHr7QmnPk9rJ9P4fOAolnEQv8PHfgAY+qA0s4=", - "version": "196.100.4" - }, - "dtrace": { - "hash": "sha256-04Q35rCKnM5Csv5poFJKpK0VplWq4hvy251/Cb2Kl80=", - "version": "401.100.3" - }, - "dyld": { - "hash": "sha256-6P/Da6xP19vmaCROoYv9pl7DaW3/U+qZBJT8PD33bn0=", - "version": "1160.6" - }, - "eap8021x": { - "hash": "sha256-Ky6KSlJhyX1NRufGhVBcp+ZFmqYrAxwC/5QvJhC2PhU=", - "version": "354.100.3" - }, - "hfs": { - "hash": "sha256-+YUVOttZU7C8I14CC6t3ZH2KxAjjTA2nB0y5bPgLxZM=", - "version": "650.0.2" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-M/jnIHzKYvdFCO0tJ1JXiD/UcZtJhLIoulaCQQUbn30=", - "version": "90" - }, - "libdispatch": { - "hash": "sha256-igqIA5DMVHjG30WMHZZpYY7LRM9hZyMWItD+UxeTehY=", - "version": "1477.100.9" - }, - "libmalloc": { - "hash": "sha256-Sh4/z7lGWRMldOPURkP5vLOAb5Ou6AUsVJEWz9wk9hI=", - "version": "521.100.59" - }, - "libplatform": { - "hash": "sha256-gojt3sWOr7XO2yYI/B1CmNLTPFieSfoNtlOgQahOCok=", - "version": "316.100.10" - }, - "libpthread": { - "hash": "sha256-phjfN8+IU8ibPsflR6LktnSi3giy89ghI+cFyrhiQNo=", - "version": "519.101.1" - }, - "mDNSResponder": { - "hash": "sha256-0ECbWeMnIRTsi03BeBEe5boyR/84JJPbxzPQze8hHSA=", - "version": "2200.100.94.0.2" - }, - "objc4": { - "hash": "sha256-eUVSpbyTEOMEdHoxSv6lZIZwB+cW/YWIaTZTcHgGOjo=", - "version": "912.3" - }, - "ppp": { - "hash": "sha256-8+QUA79sHf85yvGSPE9qCmGsrZDT3NZnbgZVroJw/Hg=", - "version": "1016" - }, - "removefile": { - "hash": "sha256-L6I0u8S3h3uV1veKA5HvkSebbBCd78ymlf//KWbebZo=", - "version": "70.100.4" - }, - "xnu": { - "hash": "sha256-j5Ep1RX5DTJqTGszrF4d/JtzUqZ6nA6XoExqcIQ0RVQ=", - "version": "10063.101.15" - } - }, - "15.5": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-+qAwL6+s7di9cX/qXtapLkjCFoDuZaSYltRJEG4qekM=", - "version": "600035" - }, - "IOAudioFamily": { - "hash": "sha256-VSk3jvsITJugtL67Qt0m4qJ879i7Fj6B/NGBFVCwpiU=", - "version": "600.2" - }, - "IOBDStorageFamily": { - "hash": "sha256-s8hTwX0jq2iPULfBLUwpzqtszWuvJrrLGbmrKa/fY4U=", - "version": "24" - }, - "IOCDStorageFamily": { - "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", - "version": "62" - }, - "IODVDStorageFamily": { - "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", - "version": "46" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-qR9lSTa7PN5Z9Nis4tfuXlcZGMIU48dete/NPD0UBbE=", - "version": "434" - }, - "IOFireWireFamily": { - "hash": "sha256-hmErAXjLWIelqJaCrB8J4IiIxyB7S6EHFY+AY9YhmKQ=", - "version": "490" - }, - "IOFireWireSBP2": { - "hash": "sha256-Xk+PDnUaO9q46nQwHwTKf/QXtGclfs0wTWiUbcV7e4s=", - "version": "452" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-P7egeaD9SSa+YyrIRzM44gILKbIL7vezXK3M6q3MBOI=", - "version": "261" - }, - "IOGraphics": { - "hash": "sha256-iysZE42mOKZbFxSZBNspaBTCRKEKK38DFGBxZWQxZxI=", - "version": "599" - }, - "IOHIDFamily": { - "hash": "sha256-gEYPyjXgQ2ABGufCKPjmzMdNRLxhELkCvOURCokyTO4=", - "version": "2115.100.21" - }, - "IOKitUser": { - "hash": "sha256-p32U+jHfwA/tqnjF4p1BmojghEXK8KxiflW3IHs2iIY=", - "version": "100150.120.2" - }, - "IONetworkingFamily": { - "hash": "sha256-gZ7Dkk4Iu7AV9K2ioqSeJ1W7bTNxv77bmT18iv3ljLg=", - "version": "185" - }, - "IOSerialFamily": { - "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", - "version": "93" - }, - "IOStorageFamily": { - "hash": "sha256-/0H0tqWUWkgYigYypucbc7lOCFYDuukwF9fvLEOhwOk=", - "version": "323" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-nWDokN0Vr5pUyNGculnDOah9RNgHiWr3S13RSQLmZrc=", - "version": "1698.100.8" - }, - "Libinfo": { - "hash": "sha256-UI5mGvzZ6BPafGYD6CrNAJAKjeJLB6urAS2lpB6X/Ec=", - "version": "597" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-GDYMVi1034f9empq0YOuumQp/BDJ7phTb0Zl4KTY9xg=", - "version": "342" - }, - "Librpcsvc": { - "hash": "sha256-UWYdCQ9QsBqwM01bWr+igINAHSdSluB/FrOclC5AjTI=", - "version": "31" - }, - "Libsystem": { - "hash": "sha256-nawWJiu2IJ34ek5iOX6CrlqMzev7TuJpUkvDp30ZQ/U=", - "version": "1351" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-ZOrOOCk+hZbzDilzkihpQfsDpzV3Ul4zy6fpFRWUQHw=", - "version": "61439.120.27" - }, - "architecture": { - "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", - "version": "282" - }, - "configd": { - "hash": "sha256-ZdUq1SrOwB88Lx68ekrA4zeVsLDZz4TAJywNnF+uAzY=", - "version": "1351.120.3" - }, - "copyfile": { - "hash": "sha256-rLqT6e44W2ohgwUXREmiOyJBYCrV3gRLbtVnbUq60xc=", - "version": "221.121.1" - }, - "dtrace": { - "hash": "sha256-iNEZyxK3DmEwO3gzrfvCaVZSEuuOMQm5IG/6FodPNdI=", - "version": "411" - }, - "dyld": { - "hash": "sha256-4OOghgUYyMJbsTe96fiWCndTJ1BS94rK9v6Kqn/ooYs=", - "version": "1285.19" - }, - "eap8021x": { - "hash": "sha256-Kx/wwnt108hDm0qQPyTNbZ8KoHkD5m7L4yb5qjSuQjI=", - "version": "365.120.2" - }, - "hfs": { - "hash": "sha256-5/3Ycp3cKqlgAl1kjBmbF5tFlfJYQS5rbrbk4SS66b8=", - "version": "683.120.3" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-pvwfcbeEJmTEPdt6/lgVswiabLRG+sMN6VT5FwG7C4Q=", - "version": "96" - }, - "libdispatch": { - "hash": "sha256-jTp2DolOOCQPBt1HRotkmPnKgQ2LGgniEqeHoM+vlKg=", - "version": "1521.120.4" - }, - "libmalloc": { - "hash": "sha256-d9AVHSYTqHDlgctv8Hh4HAYW53MJelj4F8LWPsjrsws=", - "version": "715.120.13" - }, - "libplatform": { - "hash": "sha256-gpijoTMvdkM0PdG8gyIllOJlh/MtTc4ro9ODDAhN6gM=", - "version": "349" - }, - "libpthread": { - "hash": "sha256-N+MMXdbthsxauTTfZ5ElUs39dVH+Chn1yyU6pObZpkU=", - "version": "536" - }, - "mDNSResponder": { - "hash": "sha256-ILx12PRxj/+VqfpCCErJFEJXFI9yzTh4g+FK0UCenIE=", - "version": "2600.120.12" - }, - "objc4": { - "hash": "sha256-DMxa25gXjKCkiDnVJ/8SyJUjaBlmBGABg8EfCHcmTj0=", - "version": "940.4" - }, - "ppp": { - "hash": "sha256-8+QUA79sHf85yvGSPE9qCmGsrZDT3NZnbgZVroJw/Hg=", - "version": "1016" - }, - "removefile": { - "hash": "sha256-Z5UD0mk/s80CQB0PZWDzSl2JWXmnVmwUvlNb28+hR3k=", - "version": "81" - }, - "xnu": { - "hash": "sha256-o4tCuCAIgAYg/Li3wTs12mVWr5C/4vbwu1zi+kJ9d6w=", - "version": "11417.121.6" - } - }, - "26.0": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-+qAwL6+s7di9cX/qXtapLkjCFoDuZaSYltRJEG4qekM=", - "version": "600035" - }, - "IOAudioFamily": { - "hash": "sha256-A3iiAjjP29VdjMj40tLS5Q/ni4qeh9bBpnmNzeG2pIY=", - "version": "700.2" - }, - "IOBDStorageFamily": { - "hash": "sha256-OcQUJ3nEfrpvWX/npnedJ4PECIGWFSLiM0PKoiH911w=", - "version": "26" - }, - "IOCDStorageFamily": { - "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", - "version": "62" - }, - "IODVDStorageFamily": { - "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", - "version": "46" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-qR9lSTa7PN5Z9Nis4tfuXlcZGMIU48dete/NPD0UBbE=", - "version": "436" - }, - "IOFireWireFamily": { - "hash": "sha256-hmErAXjLWIelqJaCrB8J4IiIxyB7S6EHFY+AY9YhmKQ=", - "version": "492" - }, - "IOFireWireSBP2": { - "hash": "sha256-Xk+PDnUaO9q46nQwHwTKf/QXtGclfs0wTWiUbcV7e4s=", - "version": "454" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-cM/VFhVWNVwdJYk+mme0UYttQd7eJwd7Hlo7KNRyHY0=", - "version": "262" - }, - "IOGraphics": { - "hash": "sha256-iysZE42mOKZbFxSZBNspaBTCRKEKK38DFGBxZWQxZxI=", - "version": "599" - }, - "IOHIDFamily": { - "hash": "sha256-YLnabX90g4Q8LxjwVuJF6KODCDxychWV+VJaNG9d8fI=", - "version": "2222.0.24" - }, - "IOKitUser": { - "hash": "sha256-ngwi8YMUqE0q8j7Lr5cqJwi2V+IDu3ie3bduotHIUJU=", - "version": "100222.0.4" - }, - "IONetworkingFamily": { - "hash": "sha256-ZF5ML41Y1l1liQn32qTkcl4mMvx9Xdizb9VgvTzVTL4=", - "version": "186" - }, - "IOSerialFamily": { - "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", - "version": "93" - }, - "IOStorageFamily": { - "hash": "sha256-1FKSF622qeXPGngA3UmQ2M/IU1pdlMoYBPbXytUFDaQ=", - "version": "331" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-k+HQ+qgye0ORFm0hU8WzE4ysbbEoFZ7wcbVl5giDH/E=", - "version": "1725.0.11" - }, - "Libinfo": { - "hash": "sha256-4InBEPi0n2EMo/8mIBib1Im4iTKRcRJ4IlAcLCigVGk=", - "version": "600" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-p8cJZlBYOFmI1NDHXGYjgcv8z9Ldc1amZuYlxxJfeVY=", - "version": "344.0.1" - }, - "Librpcsvc": { - "hash": "sha256-UWYdCQ9QsBqwM01bWr+igINAHSdSluB/FrOclC5AjTI=", - "version": "31" - }, - "Libsystem": { - "hash": "sha256-/NlSwPaoTVx+bl9hYsfz3C5MuLdqGv4vdAh0KDbDKmY=", - "version": "1356" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-oxOvZsDoNYZNiWf+MASHrR4Q2o5oaqvK2We51hH7CO8=", - "version": "61901.0.87.0.1" - }, - "architecture": { - "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", - "version": "282" - }, - "configd": { - "hash": "sha256-58or+OQP788UgQKO7Y8k8pY/enaSqH971ks7xCPu8fA=", - "version": "1385.0.7" - }, - "copyfile": { - "hash": "sha256-I9uDi5BDQKa7mO3XpHxv0d6PiROW2ueZ3vGfrsG0OJo=", - "version": "230.0.1.0.1" - }, - "dtrace": { - "hash": "sha256-5HpH6Cg8vWWzOX5ADD//izKDvqGnzV05Giju8lmGeyA=", - "version": "413" - }, - "dyld": { - "hash": "sha256-jzoFLwbms0rUwzyjYif/r6Rmr4kyn+as/bhc4paEPeY=", - "version": "1323.3" - }, - "eap8021x": { - "hash": "sha256-17bseWT4OWMA8hF+YSDDjxhVyJpbpP2xwv8dGti1YoM=", - "version": "368.0.3" - }, - "hfs": { - "hash": "sha256-OkgqZ03gwn2hTuHxZrPDmQOrY4Dwu7MrX+BfG+PTgvE=", - "version": "704.0.3.0.2" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-pvwfcbeEJmTEPdt6/lgVswiabLRG+sMN6VT5FwG7C4Q=", - "version": "96" - }, - "libdispatch": { - "hash": "sha256-L0+Ho9dAlMXVpqFEGIcIMsJc0gULckRulUImNEZe5MU=", - "version": "1542.0.4" - }, - "libmalloc": { - "hash": "sha256-482hgm1ESr3LWC/JhuQNGNu9smsa2Eap49/eH+YNAio=", - "version": "792.1.1" - }, - "libplatform": { - "hash": "sha256-wGZ2Im81mRXx6epgj/tbOJpg89CEbAr0Z8oFEpkyNMU=", - "version": "359.1.2" - }, - "libpthread": { - "hash": "sha256-VuMpQjxuMsdHsFq0q6QIWSWi88gVF2jNzIfti20Gkbw=", - "version": "539" - }, - "mDNSResponder": { - "hash": "sha256-iRqCpPAQDRjgRbRz3s6q2oyzq6xo+w4FTBai79104Zo=", - "version": "2881.0.25" - }, - "objc4": { - "hash": "sha256-Nlgr36yLvGkUJIEFQ5w8FAB0r2syEsRTw0KuUShNT8E=", - "version": "950" - }, - "ppp": { - "hash": "sha256-FzHZ05o7JxwgTqz0e3D68b/DiLu2x2ErzGMh0U78fLo=", - "version": "1020.1.1" - }, - "removefile": { - "hash": "sha256-Z5UD0mk/s80CQB0PZWDzSl2JWXmnVmwUvlNb28+hR3k=", - "version": "84" - }, - "xnu": { - "hash": "sha256-Cuf7kPtsn4CPXqyZmxVsJlA5i+Ikryp8ezJyGrvT63c=", - "version": "12377.1.9" - } - } -} diff --git a/pkgs/by-name/ap/apple-sdk/package.nix b/pkgs/by-name/ap/apple-sdk/package.nix index 2a0dabd97ae0..761ebb903e8f 100644 --- a/pkgs/by-name/ap/apple-sdk/package.nix +++ b/pkgs/by-name/ap/apple-sdk/package.nix @@ -34,7 +34,7 @@ let (callPackage ./common/add-core-symbolication.nix { }) (callPackage ./common/derivation-options.nix { }) (callPackage ./common/passthru-private-frameworks.nix { inherit sdkVersion; }) - (callPackage ./common/passthru-source-release-files.nix { inherit sdkVersion; }) + (callPackage ./common/passthru-source-release-files.nix { }) (callPackage ./common/remove-disallowed-packages.nix { }) (callPackage ./common/process-stubs.nix { }) ] diff --git a/pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh b/pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh deleted file mode 100755 index 6acff1be02de..000000000000 --- a/pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p coreutils curl git gnutar jq moreutils nix - -set -eu -o pipefail - -if [ ! -v 2 ]; then - echo "usage: lock-sdk-deps.sh " >&2 - echo " Decimal-separated version number." >&2 - echo " Must correspond to a tag in https://github.com/apple-oss-distributions/distribution-macOS" >&2 - echo " List of packages from the distributions-macOS repository." >&2 - echo " Packages not in the repository at the tag for will be ignored." - exit 1 -fi - -pkgdir=$(dirname "$(dirname "$(realpath "$0")")") - -lockfile=$pkgdir/metadata/apple-oss-lockfile.json -if [ ! -e "$lockfile" ]; then - touch "$lockfile" -fi - -workdir=$(mktemp -d) -trap 'rm -rf -- "$workdir"' EXIT - -sdkVersion=$1; shift -tag="macos-${sdkVersion//.}" - -declare -a packages=("$@") - -echo "Locking versions for macOS $sdkVersion using tag '$tag'..." - -pushd "$workdir" > /dev/null - -git clone --branch "$tag" https://github.com/apple-oss-distributions/distribution-macOS.git &> /dev/null -cd distribution-macOS - -for package in "${packages[@]}"; do - # If the tag exists in `release.json`, use that as an optimization to avoid downloading unnecessarily from Github. - packageTag=$(jq -r --arg package "$package" '.projects[] | select(.project == $package) | .tag' release.json) - packageCommit=$(git ls-tree -d HEAD "$package" | awk '{print $3}') - - if [ ! -d "$package" ]; then - packageCommit=HEAD - fi - - # However, sometimes it doesn’t exist. In that case, fall back to cloning the repo and check manually - # which tag corresponds to the commit from the submodule. - if [ -z "$packageTag" ]; then - git clone --no-checkout "https://github.com/apple-oss-distributions/$package.git" ../source &> /dev/null - pushd ../source > /dev/null - packageTag=$(git tag --points-at "$packageCommit") - popd > /dev/null - rm -rf ../source - fi - - packageVersion=${packageTag##"$package"-} - - curl -OL "https://github.com/apple-oss-distributions/$package/archive/$packageTag.tar.gz" &> /dev/null - tar axf "$packageTag.tar.gz" - - packageHash=$(nix --extra-experimental-features nix-command hash path "$package-$packageTag") - - pkgsjson="{\"$sdkVersion\": {\"$package\": {\"version\": \"$packageVersion\", \"hash\": \"$packageHash\"}}}" - - echo " - Locking $package to version $packageVersion with hash '$packageHash'" - jq --argjson pkg "$pkgsjson" -S '. * $pkg' "$lockfile" | sponge "$lockfile" -done - -popd > /dev/null diff --git a/pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh b/pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh deleted file mode 100755 index 3922916e6135..000000000000 --- a/pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p coreutils jq - -set -eu -o pipefail - -pkgdir=$(dirname "$(dirname "$(realpath "$0")")") - -echo '{}' > "$pkgdir/metadata/apple-oss-lockfile.json" - -declare -a versions -readarray -t versions < <(jq -r '.[].version' "$pkgdir/metadata/versions.json") - -declare -a packages=( - CarbonHeaders - CommonCrypto - IOAudioFamily - IOFireWireFamily - IOFWDVComponents - IOFireWireAVC - IOFireWireSBP2 - IOFireWireSerialBusProtocolTransport - IOGraphics - IOHIDFamily - IONetworkingFamily - IOSerialFamily - IOStorageFamily - IOBDStorageFamily - IOCDStorageFamily - IODVDStorageFamily - IOUSBFamily - IOKitUser - Libc - Libinfo - Libm - Libnotify - Librpcsvc - Libsystem - OpenDirectory - Security - architecture - configd - copyfile - dtrace - dyld - eap8021x - hfs - launchd - libclosure - libdispatch - libmalloc - libplatform - libpthread - mDNSResponder - objc4 - ppp - removefile - xnu -) - -for version in "${versions[@]}"; do - "$pkgdir/scripts/lock-sdk-deps.sh" "$version" "${packages[@]}" -done