Commit Graph

20 Commits

Author SHA1 Message Date
Randy Eckenrode
6b62554356
darwin.swift-corelibs-foundation: avoid infinite recursion
Drop ninja and use a minimal Python to avoid an infinite recursion due
to dependencies that depend on configd, which also depends on this.
2023-11-02 17:45:59 -04:00
Randy Eckenrode
8bee297d15
swift-corelibs: actually provide and use the hook
@emilazy found a bug in #234861. Specifically, the hook is not actually
applied. e2fsprogs links against darwin.CF, but since it cannot find the
framework by rpath, it crashes.

Since the hook should always be used, it is copied directly to
`nix-support/setup-hook` instead of providing it as an attribute. This
preserves dropping the hook in the cross-compilation case while
providing it for everything else that needs it.

To avoid further churn and due to the complexity of building the stdenv
with the hook active, this change required the stdenv rework.
2023-07-02 17:56:25 -04:00
Randy Eckenrode
ebc1bcf409
swift-corelibs: don’t link against libcurl
swift-corelibs uses libcurl to implement `NSURLSession` in Foundation
via the symbols exported by CF. Foundation is not build on Darwin, and
these symbols are not exported by the system CoreFoundation.

By not linking against libcurl, this breaks a cycle between CF and
libcurl. That should allow libcurl to drop the patch disabling
linking against the SystemConfiguration and restore NAT64 support.

Unfortunately, the Darwin stdenv bootstrap still needs to build
dependencies that use `fetchFromGitHub`. While it can drop curl from the
final stdenv, it still needs to use it during the stdenv bootstrap.
2023-07-02 17:56:25 -04:00
Randy Eckenrode
6dbdf283cf
swift-corelibs: switch to nixpkgs icu
Upstream swift-corelibs links against icu on Linux, so it is not
necessarily tied to the version of ICU provided by Apple for Darwin.

swift-corelibs and qtwebkit are the only two packages that link against
darwin.ICU. Switching to the nixpkgs icu will allow the Darwin-specific
package to be deprecated and removed eventually.
2023-07-02 17:56:25 -04:00
Randy Eckenrode
aeb53a823f
swift-corelibs: switch build system to cmake
Switching the build system to cmake makes it easier to make changes to
the build (particularly which dependencies to link). It also removes a
lot of manual build steps and fixes the issue identified by @emilazy in
NixOS#238791.

Fixes NixOS#238791.
2023-07-02 17:56:25 -04:00
Randy Eckenrode
8c16d17bdc
swift-corelibs: fix build with clang 16
swift-corelibs fails to build due to a missing header and an invalid
pointer conversion. Patches are provided to fix both of these issues.
2023-07-02 17:56:25 -04:00
Randy Eckenrode
0d3355a439
swift-corelibs: set NIX_COREFOUNDATION_RPATH in a hook
Closes #230870. Thanks to @eliasnaur for the test case and for rasining
awareness and to @veprbl for the work done on #111385.

This takes a slightly different approach from those two PRs. The hook is
set unconditionally. The stdenv bootstrap doesn’t really need CF at all,
so setting the hook is harmless. This simplifies things.
2023-05-29 15:43:58 -04:00
Felix Buehler
b40eaa1675 swift-corelibs: use pname&version instead of name 2021-12-05 15:39:48 +01:00
Sandro Jäckel
7e9d442837 darwin.CF: Add pre-/postBuild hooks to buildPhase 2021-11-24 15:17:13 -08:00
toonn
3b2d3f65b7 darwin.CF: Drop clang 7 workaround 2021-11-24 15:17:13 -08:00
toonn
2bb0e256ea darwin.CF: Include missing TARGET_OS_* defines
This patch is static and may not be appropriate if the compilation
target is iOS.
2021-11-24 15:17:13 -08:00
Dmitry Kalinkin
684963881b
darwin.CF: fix sandboxed build
Had to abandon the use of sourceRoot primarily because it prevents
stdenv from chmod'ing the ../configure into a writable file.
2021-01-28 16:55:53 -05:00
Ben Siraphob
16d91ee628 pkgs/os-specific: stdenv.lib -> lib 2021-01-17 23:26:08 +07:00
Daiderd Jordan
453e009947
darwin.CF: python2 -> python3 2020-01-13 11:13:06 +01:00
Daiderd Jordan
d5d8b3514d darwin.CF: fix retry condition (close PR #75528)
Using a function in an if condition when set -e is set doesn't seem to
break out or return false which means the workaround from 41ca86129f
never gets triggered.
2019-12-12 08:16:32 +01:00
Daiderd Jordan
41ca86129f
darwin.CF: workaround intermittent CFRuntime.c failures
Based on testing this issue seems to only occur with clang_7, so
we should be able to revert this when the default llvm versions are
updated.

Fixes #66811
2019-11-17 14:55:00 +01:00
Daiderd Jordan
051fcba987
swift-corefoundation: fix sandboxed build 2019-02-12 00:29:28 +01:00
Dan Peebles
4efd4053ed stdenv/darwin: integrate a new CoreFoundation
This also updates the bootstrap tool builder to LLVM 5, but not the ones
we actually use for bootstrap. I'll make that change in a subsequent commit
so as to provide traceable provenance of the bootstrap tools.
2018-09-15 16:05:46 -04:00
Dan Peebles
f223f417fa swift-corelibs.corefoundation: update and modernize
This actually makes it useful to the Darwin stdenv, which I'll soon be
adjusting to use this library
2018-09-08 03:08:16 -04:00
Matthew Bauer
72f8df9465 swift-corelibs: init
moves swift-corelibs-corefoundation to own dir

also adds libdispatch
2018-04-09 18:35:35 -05:00