-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
darwin: change the SDK pattern, update the SDKs, and update source releases #346043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
157 commits
Select commit
Hold shift + click to select a range
22369ef
maintainers/team-list.nix: add reckenrode to darwin
reckenrode 08ad882
darwin: add bootstrapStdenv
reckenrode 40d415f
darwin: add darwinMinVersionHook
reckenrode 5721c4f
darwin: add libSystem
reckenrode 1211498
darwin: add xcodeProjectCheckHook
reckenrode 8f8e240
darwin.apple-source-releases: add mkAppleDerivation
reckenrode 6a54c7f
darwin.apple-source-releases: add update-source-releases.sh
reckenrode 639108e
darwin.libsbuf: init at 14.1
reckenrode 5567902
apple-sdk: init at 10.12.2 and 11.3
reckenrode 3fb982d
apple-sdk_10_13: init at 10.13.2
reckenrode a447cba
apple-sdk_10_14: init at 10.14.6
reckenrode d10c85b
apple-sdk_10_15: init at 10.15.6
reckenrode 689e898
apple-sdk_12: init at 12.3
reckenrode 4283b8f
apple-sdk_13: init at 13.3
reckenrode 8fae285
apple-sdk_14: init at 14.4
reckenrode d1c2539
darwin: add mkStub for deprecating frameworks
reckenrode 17aeace
darwin: prepare for adding stub packages
reckenrode fcd9dc8
darwin.apple_sdk_11_0: convert frameworks and libs to stubs
reckenrode 4802277
darwin.apple_sdk_12_3: convert frameworks and libs to stubs
reckenrode 0a3c487
darwin.apple_sdk: convert frameworks and libs to stubs
reckenrode 9ecb69c
darwin.apple_sdk: drop gen-frameworks.py (replaced by new SDK pattern)
reckenrode c218ce1
darwin: replace framework chooser with stubs
reckenrode 97d75cb
{bintools,cc}-wrapper: set up Darwin SDK paths
reckenrode 51755b0
{bintools,cc}-wrapper: use a fallback SDK when `DEVELOPER_DIR` is not…
reckenrode 826edbf
{bintools,cc}-wrapper: fix static builds on Darwin
reckenrode a556a81
atf: build with the bootstrap stdenv on Darwin
reckenrode 54d591b
cmake: undo `/var/empty` workaround for Darwin SDK paths
reckenrode 472d10b
cmake: do in fact use the Darwin SDK in the setup hook
reckenrode a79ed0d
gnutar: make sure libiconv is linked
reckenrode f1480a2
libpng: build with the bootstrap stdenv on Darwin
reckenrode 1ebcfd5
libuv: Use darwin.libutil on Darwin
reckenrode 5a60ff8
libxml2: build with the bootstrap stdenv on Darwin
reckenrode 25c6fe1
llvmPackages.clang: backport __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
reckenrode 4dc3227
llvmPackages.clang: use the system libunwind on Darwin
reckenrode d3114e0
llvmPackages.compiler-rt: align Darwin bootstrap with other platforms
reckenrode 654e19f
llvmPackages.compiler-rt: always build sanitizers on Darwin
reckenrode 7647c68
llvmPackages.compiler-rt: avoid propagating the SDK in static builds
reckenrode 2fd9a1a
llvmPackages.compiler-rt: drop use of xcbuild
reckenrode e6a4c83
llvmPackages.compiler-rt: fix compiler-rt bootstrap on Darwin
reckenrode 3e5acda
llvmPackages.compiler-rt: fix cross-compilation on Darwin
reckenrode 18211ad
llvmPackages.libcxx: use a bootstrap stdenv on Darwin
reckenrode 34ce30c
llvmPackages.libllvm: disable tests when built in the Darwin bootstrap
reckenrode bf45402
ncurses: build with the bootstrap stdenv on Darwin
reckenrode aef4614
xar: add xarMinimal
reckenrode 45e65c1
xcbuild: move to pkgs/by-name
reckenrode f51c62a
xcbuild: format with nixfmt-rfc-style
reckenrode 15ac657
xcbuild: refactor to support the new SDKs
reckenrode 118a214
xcbuild: warn when someone tries to override `sdkVer`
reckenrode 49834c3
xcbuild: suppress warning for now
reckenrode fee84be
xcbuild: suppress xcbuild passthru warning for now
reckenrode dd569d8
xcbuild: avoid `xcrun` invoking itself via `/usr/bin` stubs
reckenrode 75bc428
xcbuild: 0.1.2-pre -> 0.1.1-unstable-2019-11-20
reckenrode 1fd1796
zlib: build with the bootstrap stdenv on Darwin
reckenrode 76a5ef6
darwin.stdenv: rework for the new SDK
reckenrode 9c004ef
darwin.stdenv: use xarMinimal
reckenrode b7442b9
darwin.stdenv: provide an SDK when cross-compiling
reckenrode 4624bd7
darwin.adv_cmds: convert to Meson and use mkAppleDerivation
reckenrode 78076b3
darwin.AvailabilityVersions: use mkAppleDerivation
reckenrode 129a959
darwin.AvailabilityVersions: also generate _symbol_aliasing.h
reckenrode 8e7056c
darwin.AvailabilityVersions: remove workaround
reckenrode 94b1474
darwin.basic_cmds: convert to Meson and use mkAppleDerivation
reckenrode c5c276b
darwin.bootstrap_cmds: convert to Meson and use mkAppleDerivation
reckenrode b878c44
darwin.bsdmake: add to darwin-aliases.nix
reckenrode 8574626
darwin.copyfile: convert to Meson and use mkAppleDerivation
reckenrode b8dbc16
darwin.Csu: use mkAppleDerivation
reckenrode 83807dc
darwin.developer_cmds: convert to Meson and use mkAppleDerivation
reckenrode 97454b4
darwin.diskdev_cmds: convert to Meson and use mkAppleDerivation
reckenrode eed715a
darwin.file_cmds: convert to Meson and use mkAppleDerivation
reckenrode 0335ce0
darwin.ICU: convert to upstream build system and use mkAppleDerivation
reckenrode ca4dd24
darwin.libiconv: move back to darwin attrset and use mkAppleDerivation
reckenrode b0884d5
darwin.libiconv: use finalPackage when referencing doInstallCheck
reckenrode 9af3511
darwin.libiconv: use `EOF` instead of `-header` for the herdoc
reckenrode 375057b
darwin.libresolv: convert to Meson and use mkAppleDerivation
reckenrode dac3f1f
macfuse-stubs: use top-level libtapi
reckenrode b8be4c4
darwin.libtapi: add to darwin-aliases.nix
reckenrode 4b4270c
darwin.libutil: convert to Meson and use mkAppleDerivation
reckenrode 822a865
darwin.network_cmds: convert to Meson and use mkAppleDerivation
reckenrode 6fca3b4
darwin.PowerManagement: convert to Meson and use mkAppleDerivation
reckenrode 149eb5a
darwin.removefile: convert to Meson and use mkAppleDerivation
reckenrode a19b0a7
darwin.shell_cmds: convert to Meson and use mkAppleDerivation
reckenrode 9ea9221
darwin.system_cmds: use mkAppleDerivation
reckenrode 97da1bd
darwin.text_cmds: convert to Meson and use mkAppleDerivation
reckenrode 29a87d6
darwin.top: convert to Meson and use mkAppleDerivation
reckenrode 9d376e2
cctools: drop darwin.objc4 from build inputs
reckenrode 3904162
cctools: move libtool to its own output
reckenrode 2bf9c22
ld64: ensure ld64 checks pass with the new SDK
reckenrode 1c17748
ld64: drop libunwind as a dependency
reckenrode f90d4d5
ld64: adopt source release private headers pattern
reckenrode 84f8fcf
libcCross: use darwin.libSystem unconditionally
reckenrode 6986cab
libunwind: add a comment explaining the package situation
reckenrode 8a0d884
libxo: init at 1.7.5
reckenrode 66fcbb9
makeStaticDarwin: drop darwin-portable-libSystem-hook
reckenrode 1c26a2f
makeStaticDarwin: handle when `env.NIX_CFLAGS_LINK` is set
reckenrode 0e61488
overrideSDK: update for the new SDK
reckenrode b62e262
python27: drop configd
reckenrode 3e5316c
python3: drop configd
reckenrode 092b50a
python3: fix stdenv bootstrap on x86_64-darwin
reckenrode 7a8e3bf
darwin.CF: remove and replace with stubs
reckenrode 2ed29e2
darwin.CarbonHeaders: remove and replace with stubs
reckenrode 4fbe414
darwin.CommonCrypto: remove and replace with stubs
reckenrode 390e8e7
darwin.CoreSymbolication: remove and replace with stubs
reckenrode 65650be
darwin.IOKit: remove and replace with stubs
reckenrode 2e1f901
darwin.Libc: remove and replace with stubs
reckenrode 0d76542
darwin.Libinfo: remove and replace with stubs
reckenrode 67271ab
darwin.Libm: remove and replace with stubs
reckenrode b47afcc
darwin.Libnotify: remove and replace with stubs
reckenrode fe9623e
darwin.Librpcsvc: remove and replace with stubs
reckenrode db40aca
darwin.Libsystem: remove and replace with stubs
reckenrode 07272a0
darwin.Security: remove and replace with stubs
reckenrode fd2ae22
darwin.architecture: remove and replace with stubs
reckenrode ac79109
darwin.configd: remove and replace with stubs (including configdHeaders)
reckenrode d78b641
darwin.darwin-stubs: remove and replace with stubs
reckenrode ae78385
darwin.dtrace: remove and replace with stubs
reckenrode 8a59383
darwin.dyld: remove and replace with stubs
reckenrode cce88cf
darwin.eap8021x: remove and replace with stubs
reckenrode 2ade0ae
darwin.hfs: remove and replace with stubs (including hfsHeaders)
reckenrode 1c2dde0
darwin.launchd: remove and replace with stubs
reckenrode eb7c5f8
darwin.libclosure: remove and replace with stubs
reckenrode b9005e1
darwin.libdispatch: remove and replace with stubs
reckenrode 1afb8b5
darwin.libmalloc: remove and replace with stubs
reckenrode 29f65b3
darwin.libplatform: remove and replace with stubs
reckenrode 7b23be1
darwin.libpthread: remove and replace with stubs
reckenrode ec40b04
darwin.libunwind: improve compatibility with libunwind
reckenrode 259c350
darwin.libunwind: remove source release
reckenrode 4c77578
darwin.mDNSResponder: remove and replace with stubs
reckenrode 7be27dc
darwin.objc4: remove and replace with stubs
reckenrode 03e585a
darwin.ppp: remove and replace with stubs
reckenrode 6b6277e
darwin.xnu: remove and replace with stubs
reckenrode 6c6b7b0
darwin.apple-source-releases: switch to new source release pattern
reckenrode bdf3046
darwin.adv_cmds: 163 -> 231
reckenrode 4854f28
darwin.AvailabilityVersions: 140.1 -> 143.3
reckenrode ab006b0
darwin.basic_cmds: 55 -> 70
reckenrode 4d328d0
darwin.bootstrap_cmds: 121 -> 136
reckenrode d5f4ae4
darwin.copyfile: 138 -> 213
reckenrode 82a2469
darwin.developer_cmds: 62 -> 79
reckenrode e0cf96b
darwin.diskdev_cmds: 593 -> 735
reckenrode c640ed8
darwin.doc_cmds: init at 66
reckenrode 32f5feb
darwin.file_cmds: 264.1.1 -> 448.0.3
reckenrode 47df058
darwin.ICU: 66108 -> 74221
reckenrode d3ca461
darwin.IOKitTools: init at 125
reckenrode 1d8c6e7
darwin.libiconv: 99 -> 107
reckenrode 9c31a3e
darwin.libpcap: init at 135
reckenrode fc97344
darwin.libresolv: 64 -> 83
reckenrode edb2497
darwin.libutil: 47.30.1 -> 72
reckenrode 44f1fa4
darwin.mail_cmds: init at 38.0.1
reckenrode 42daeac
darwin.misc_cmds: init at 44
reckenrode d293dd1
darwin.network_cmds: 606.40.2 -> 696
reckenrode 01d1005
darwin.patch_cmds: init at 62
reckenrode 6d0bc8c
darwin.PowerManagement: 572.50.1 -> 1740.0.7
reckenrode f493fb8
darwin.remote_cmds: init at 303.0.2
reckenrode a32fcaa
darwin.removefile: 45 -> 75
reckenrode 7b84d89
darwin.shell_cmds: 187 -> 319.0.1
reckenrode 72f19ad
darwin.system_cmds: 970.0.4 -> 1012
reckenrode 63bfe3c
darwin.text_cmds: 99 -> 190.0.1
reckenrode 7e4956a
darwin.top: 108 -> 139
reckenrode bafc6ff
darwin.xattr: replace with xattr from file_cmds
reckenrode e3f2829
xar: 498 -> 501
reckenrode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
51 changes: 51 additions & 0 deletions
51
pkgs/by-name/ap/apple-sdk/common/add-core-symbolication.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| lib, | ||
| fetchFromGitHub, | ||
| stdenvNoCC, | ||
| }: | ||
|
|
||
| let | ||
| CoreSymbolication = stdenvNoCC.mkDerivation (finalAttrs: { | ||
| pname = "CoreSymbolication"; | ||
| version = "0-unstable-2018-06-17"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| repo = "CoreSymbolication"; | ||
| owner = "matthewbauer"; | ||
| rev = "24c87c23664b3ee05dc7a5a87d647ae476a680e4"; | ||
| hash = "sha256-PzvLq94eNhP0+rLwGMKcMzxuD6MlrNI7iT/eV0obtSE="; | ||
| }; | ||
|
emilazy marked this conversation as resolved.
Outdated
|
||
|
|
||
| patches = [ | ||
| # Add missing symbol definitions needed to build `zlog` in system_cmds. | ||
| # https://github.com/matthewbauer/CoreSymbolication/pull/2 | ||
| ../patches/0001-Add-function-definitions-needed-to-build-zlog-in-sys.patch | ||
| ../patches/0002-Add-CF_EXPORT-To-const-symbols.patch | ||
|
emilazy marked this conversation as resolved.
Outdated
|
||
| ]; | ||
|
|
||
| dontBuild = true; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p "$out/include" | ||
| cp *.h "$out/include" | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "Reverse engineered headers for Apple's CoreSymbolication framework"; | ||
| homepage = "https://github.com/matthewbauer/CoreSymbolication"; | ||
| license = lib.licenses.mit; | ||
| maintainers = lib.teams.darwin.members; | ||
| platforms = lib.platforms.darwin; | ||
| }; | ||
| }); | ||
| in | ||
| self: super: { | ||
| buildPhase = | ||
| super.buildPhase or "" | ||
| + '' | ||
| mkdir -p System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/Headers | ||
| ln -s A System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/Current | ||
| ln -s Versions/Current/Headers System/Library/PrivateFrameworks/CoreSymbolication.framework/Headers | ||
| cp '${CoreSymbolication}/include/'*.h System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/Headers | ||
| ''; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { lib, config }: | ||
|
|
||
| self: super: { | ||
| preBuild = | ||
| super.preBuild or "" | ||
| + '' | ||
| platformPath=$out/Platforms/MacOSX.platform | ||
| sdkpath=$platformPath/Developer/SDKs | ||
| ''; | ||
|
|
||
| preInstall = | ||
| super.preInstall or "" | ||
| + '' | ||
| platformPath=$out/Platforms/MacOSX.platform | ||
| sdkpath=$platformPath/Developer/SDKs | ||
| ''; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| lib, | ||
| fetchurl, | ||
| cpio, | ||
| pbzx, | ||
| }: | ||
|
|
||
| { | ||
| url, | ||
| version, | ||
| hash, | ||
| }: | ||
|
|
||
| fetchurl { | ||
| pname = "macOS-SDK"; | ||
| inherit version url hash; | ||
|
|
||
| recursiveHash = true; | ||
|
|
||
| nativeBuildInputs = [ | ||
| cpio | ||
| pbzx | ||
| ]; | ||
|
|
||
| postFetch = '' | ||
| renamed=$(mktemp -d)/sdk.xar | ||
| mv "$downloadedFile" "$renamed" | ||
| pbzx "$renamed" | cpio -idm | ||
|
reckenrode marked this conversation as resolved.
Outdated
|
||
|
|
||
| # SDKs are inconsistent about whether MacOSX.sdk or MacOSX<version>.sdk is a symlink. | ||
| src=Library/Developer/CommandLineTools/SDKs/MacOSX${lib.versions.majorMinor version}.sdk | ||
| if [ ! -d $src ]; then | ||
| src=Library/Developer/CommandLineTools/SDKs/MacOSX.sdk | ||
| fi | ||
|
|
||
| # Remove unwanted binaries, man pages, and folders from the SDK. | ||
| rm -rf $src/usr/bin $src/usr/share $src/System/Library/Perl | ||
|
|
||
| mkdir -p "$out" | ||
| cp -rd $src/* "$out" | ||
| ''; | ||
| } | ||
9 changes: 9 additions & 0 deletions
9
pkgs/by-name/ap/apple-sdk/common/passthru-private-frameworks.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { makeSetupHook, sdkVersion }: | ||
|
|
||
| self: super: { | ||
| passthru = super.passthru or { } // { | ||
| privateFrameworksHook = makeSetupHook { | ||
| name = "apple-sdk-private-frameworks-hook"; | ||
| } ../setup-hooks/add-private-frameworks.sh; | ||
| }; | ||
| } |
37 changes: 37 additions & 0 deletions
37
pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| let | ||
| lockfile = builtins.fromJSON (builtins.readFile ../metadata/apple-oss-lockfile.json); | ||
| in | ||
|
|
||
| { | ||
| 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; | ||
| }; | ||
|
emilazy marked this conversation as resolved.
Outdated
|
||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.