Commit Graph
692197 Commits
Author SHA1 Message Date
Randy Eckenrode 66fcbb94e7 makeStaticDarwin: drop darwin-portable-libSystem-hook
`${stdenv.cc.libc}/lib/libSystem.B.dylib` does not exist and not existed
for as long as I have used nixpkgs. Since `/usr/lib/libSystem.B.dylib`
is already linked via text-based stubs, continue relying on those.
2024-10-10 16:23:08 -04:00
Randy Eckenrode 8a0d884405 libxo: init at 1.7.5 2024-10-10 16:23:08 -04:00
Randy Eckenrode 6986cab64b libunwind: add a comment explaining the package situation
libunwind is unnecessary on Darwin because it is included in the SDK,
but setting libunwind to `null` would cause evaluation errors.
Additionally, some packages expect to locate libunwind via pkg-config.
Set the top-level libunwind to the Darwin compatibility package, so
those packages can find it and use it.
2024-10-10 16:23:08 -04:00
Randy Eckenrode 84f8fcfc3e libcCross: use darwin.libSystem unconditionally
Darwin’s libc is a stub that does nothing but avoid unwanted compiler
and linker warnings. The actual libc is located dynamically based on the
SDK. To support cross-compilation, the SDK is located based on platform:
- `DEVELOPER_DIR_FOR_BUILD` - build platform;
- `DEVELOPER_DIR` - host platform; and
- `DEVELOPER_DIR_FOR_TARGET` - target platform.
2024-10-10 16:23:07 -04:00
Randy Eckenrode f90d4d5e5b ld64: adopt source release private headers pattern
Most Darwin source releases vendor private headers in a separate
derivation and add them to `NIX_CFLAGS_COMPILE` (to avoid propagating
them in static builds). Adopt this pattern for consistency with the
other source releases.
2024-10-10 16:23:07 -04:00
Randy Eckenrode 1c1774806d ld64: drop libunwind as a dependency
libunwind is included in the SDK, so it’s no longer necessary to include
it as an explicit dependency.
2024-10-10 16:23:07 -04:00
Randy Eckenrode 2bf9c22eb1 ld64: ensure ld64 checks pass with the new SDK
The SDK library path is normally add by the ld wrapper, but ld64 is
being used unwrapped in this check phase. Ensure it can find the
requires SDK stubs by passing them via the clang wrapper.
2024-10-10 16:23:07 -04:00
Randy Eckenrode 39041627fe cctools: move libtool to its own output
Many packages need only libtool from cctools, which is different from
GNU libtool (commonly used with other autotools), so it can’t be
provided by default with the Darwin bintools. Providing it as a separate
output allows packages to use cctools’s libtool without pulling other
tools they may not want.
2024-10-10 16:23:07 -04:00
Randy Eckenrode 9d376e2c53 cctools: drop darwin.objc4 from build inputs
It’s not necessary with the new SDK.
2024-10-10 16:23:07 -04:00
Randy Eckenrode 29a87d6751 darwin.top: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:07 -04:00
Randy Eckenrode 97da1bdf09 darwin.text_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:07 -04:00
Randy Eckenrode 9ea9221a1e darwin.system_cmds: use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode a19b0a7345 darwin.shell_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode 149eb5aef4 darwin.removefile: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode 6fca3b4a70 darwin.PowerManagement: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode 822a865209 darwin.network_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode 4b4270cca3 darwin.libutil: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode b8be4c4e6d darwin.libtapi: add to darwin-aliases.nix 2024-10-10 16:23:06 -04:00
Randy Eckenrode dac3f1f224 macfuse-stubs: use top-level libtapi 2024-10-10 16:23:06 -04:00
Randy Eckenrode 375057b9f5 darwin.libresolv: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:06 -04:00
Randy Eckenrode 9af3511fb2 darwin.libiconv: use EOF instead of -header for the herdoc 2024-10-10 16:23:05 -04:00
Randy Eckenrode b0884d52f2 darwin.libiconv: use finalPackage when referencing doInstallCheck 2024-10-10 16:23:05 -04:00
Randy Eckenrode ca4dd24306 darwin.libiconv: move back to darwin attrset and use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode 0335ce09c0 darwin.ICU: convert to upstream build system and use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode eed715ac43 darwin.file_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode 97454b46d5 darwin.diskdev_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode 83807dc4e9 darwin.developer_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode b8dbc16f1b darwin.Csu: use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode 8574626dbb darwin.copyfile: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:05 -04:00
Randy Eckenrode b878c44404 darwin.bsdmake: add to darwin-aliases.nix
Use portable bmake instead of Apple’s port of BSD Make.
2024-10-10 16:23:04 -04:00
Randy Eckenrode c5c276b6cb darwin.bootstrap_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:04 -04:00
Randy Eckenrode 94b14746e0 darwin.basic_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:04 -04:00
Randy Eckenrode 8e7056cc07 darwin.AvailabilityVersions: remove workaround
The patch adding support for `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__`
to clang has been backported to all versions of clang in nixpkgs (except
for clang 12), allowing this workaround to be dropped.
2024-10-10 16:23:04 -04:00
Randy Eckenrode 129a959fad darwin.AvailabilityVersions: also generate _symbol_aliasing.h 2024-10-10 16:23:04 -04:00
Randy Eckenrode 78076b3c12 darwin.AvailabilityVersions: use mkAppleDerivation 2024-10-10 16:23:04 -04:00
Randy Eckenrode 4624bd7959 darwin.adv_cmds: convert to Meson and use mkAppleDerivation 2024-10-10 16:23:04 -04:00
Randy Eckenrode b7442b9066 darwin.stdenv: provide an SDK when cross-compiling
Static can rely on the standard cross-SDK because it will be a static
SDK when building for static targets.
2024-10-10 16:23:04 -04:00
Randy Eckenrode 9c004ef367 darwin.stdenv: use xarMinimal
Using xarMinimal avoids pulling e2fsprogs and (eventually) macfuse-stubs
into the Darwin stdenv bootstrap.
2024-10-10 16:23:03 -04:00
Randy Eckenrode 76a5ef680e darwin.stdenv: rework for the new SDK
While it would be nice if this could be split, there are too many
changes as part of the cleanup and improvements, including:

- Refactoring all propagated packages into functions that can be used to
  ensure that packages are propagated only at the expected stages;
- Using a sanity-checking merge function to ensure that packages are
  only propagated by one of the above functions;
- Reducing the number of Python builds during the bootstrap to one;
- Removing the extra sysctl stage;
- Using the LLVM bootstrap to build LLVM, clang, libc++, etc;
- Propagating llvmPackages_<version> in the final stdenv, so that
  packages needing that version specifically don’t have to rebuild it;
- Bootstrapping with the new Darwin SDK; and
- Reducing the overall number of paths build during a bootstrap by ~33%.
2024-10-10 16:23:03 -04:00
Randy Eckenrode 1fd1796e65 zlib: build with the bootstrap stdenv on Darwin
Using the bootstrap stdenv avoids an infinite recursion from xcbuild
depending on zlib depending on xcrun from xcbuild, which is propagated
by the non-bootstrap stdenv.
2024-10-10 16:23:03 -04:00
Randy Eckenrode 75bc428cf2 xcbuild: 0.1.2-pre -> 0.1.1-unstable-2019-11-20
xcbuild is archived and will never be updated, so bump it to the last
commit in the repo.
2024-10-10 16:23:03 -04:00
Randy Eckenrode dd569d8913 xcbuild: avoid xcrun invoking itself via /usr/bin stubs
macOS ships with several stubs in `/usr/bin` that invoke `xcrun` to run
the tools from the active SDK. When `/usr/bin` is in `PATH`, this will
cause `xcrun` from xcbuild to invoke itself over and over. Filtering
`/usr/bin` from `xcrun`’s search path prevents this from happening.
2024-10-10 16:23:03 -04:00
Randy Eckenrode fee84be752 xcbuild: suppress xcbuild passthru warning for now 2024-10-10 16:23:03 -04:00
Randy Eckenrode 49834c3000 xcbuild: suppress warning for now
Enabling this by default requires additional clean that will be done
after the Darwin refactor has been merged.
2024-10-10 16:23:03 -04:00
Randy Eckenrode 118a214ac5 xcbuild: warn when someone tries to override sdkVer
xcbuild determines the SDK dynamically, so overriding the `sdkVer` no
longer works. If packages want to change the SDK, they need to add one
of the SDK packages to their inputs.
2024-10-10 16:23:03 -04:00
Randy Eckenrode 15ac657942 xcbuild: refactor to support the new SDKs
Take advantage of the new Darwin SDKs to dynamically determine SDK
information such as path, version, and binaries (via `xcrun --find`).
This is accomplished by relying on the existance of `DEVELOPER_DIR`,
which the SDK will set up in nixpkgs.
2024-10-10 16:23:02 -04:00
Randy Eckenrode f51c62a7f8 xcbuild: format with nixfmt-rfc-style 2024-10-10 16:23:02 -04:00
Randy Eckenrode 45e65c16d2 xcbuild: move to pkgs/by-name 2024-10-10 16:23:02 -04:00
Randy Eckenrode aef4614421 xar: add xarMinimal
xarMinimal allows e2fsprogs to build fuse2fs again on Darwin.
See https://github.com/NixOS/nixpkgs/pull/339412.
2024-10-10 16:23:02 -04:00
Randy Eckenrode bf45402971 ncurses: build with the bootstrap stdenv on Darwin
Using the bootstrap stdenv avoids an infinite recursion from xcbuild
depending on ncurses depending on xcrun from xcbuild, which is
propagated by the non-bootstrap stdenv.
2024-10-10 16:23:02 -04:00