Commit Graph

63 Commits

Author SHA1 Message Date
Emily
af876a3d24 darwin.apple_sdk_11_0.callPackage: fix eval on non‐Darwin 2024-10-16 20:32:55 +01:00
Randy Eckenrode
fcd9dc8ac6
darwin.apple_sdk_11_0: convert frameworks and libs to stubs 2024-10-10 16:22:59 -04:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Reno Dakota
3cb23cec23
treewide: fixes to allow x64 darwin to default to sdk 11
update code to not assume that x64 darwin must use sdk 10.12. After this
change it's possible to build a sdk 11 stdenv on darwin x64
2024-07-02 23:30:01 +00:00
Randy Eckenrode
39a5f4a6ee
darwin.apple_sdk.sdkRoot: init at 10.12 and 11.0
Based on the derivation from xcbuild.sdk. apple_sdk.sdkRoot provides
version plists and a hook that passes them automatically to the compiler
as `-isysroot`. This is needed to correctly set the SDK version in
compiled binaries. Otherwise, clang will infer the SDK version to be the
same as the deployment target, which is usually not what you want.
2024-03-29 08:47:41 -04:00
Randy Eckenrode
0fb285678d
darwin.apple_sdk.darwin-stubs: add SDK-specific stubs
For the 11.0 SDK, base the stubs on the SDK for now.
2024-03-16 19:21:47 -04:00
Randy Eckenrode
f28c4bba5c
Merge pull request #282851 from stephank/feat/darwin-apinotes
darwin.Libsystem: add missing Darwin.apinotes
2024-02-14 06:34:45 -05:00
Weijia Wang
c7c64a8c72 darwin.apple_sdk_11_0.stdenv: set darwinSdkVersion on all platforms 2024-01-29 21:53:14 +01:00
Stéphan Kochen
e6f0d7250d darwin.Libsystem: add missing Darwin.apinotes
This apparently affects imports from Swift and, at the time of writing,
contains mappings for `CLOCK_*` constants.
2024-01-22 10:54:58 +01:00
Emily Trau
9aafa9b258 darwin.apple_sdk_11_0.libcompression: init at 11.0.0 2023-12-31 13:19:10 +11:00
Randy Eckenrode
5d608cc925
darwin.apple_sdk_11_0.frameworks.CoreVideo: switch to sed
CoreVideo is failing to build during the bootstrap because the bootstrap
awk lacks support for in-place editing. Fix it by using sed instead.
2023-11-13 16:30:38 -05:00
Austin Horstman
51c024de65
apple-sdk-11.0: add Apple80211 private framework 2023-11-02 14:56:59 -05:00
Randy Eckenrode
8e56a2635f
CoreFoundation: specify the tbd explicitly
The current hook specifies the path to the framework library, but
nixpkgs does not actually provide the library when linking against the
system framework. It provides a text-based stub (`.tbd`) instead. ld64
will find the stub and use it, but lld will not when the full path is
specified. Both linkers work if the extension is included, so do that
for compatibility with both. This fixes using lld with CoreFoundation
(e.g., to support LTO on Darwin).
2023-08-12 09:17:13 -04:00
Austin Horstman
0610720dad
apple_sdk_11_0: Add MediaRemote private framework 2023-07-30 14:16:06 -05:00
Alyssa Ross
0f2191f3b2
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/development/compilers/gcc/11/default.nix
2023-06-22 06:23:16 +00:00
Weijia Wang
1447a5804b qt6.qtwebengine: unbreak on x86_64-darwin 2023-06-22 07:23:21 +03:00
Randy Eckenrode
28fe4eec0f
apple_sdk_11_0.stdenv: replace extraBuildInputs with CF from 11.0 SDK
This can result in swift-corefoundation being included even when a
derivation uses `apple_sdk_11_0.stdenv` directly, which may result in
hard to debug compiler errors (unless you just happen to know cryptic
compiler errors means the 10.12 and 11.0 SDKs have been mixed).
2023-06-11 12:27:32 -04:00
Weijia Wang
588f16c917 darwin.apple_sdk_11_0: deprecate clang*Stdenv 2023-05-29 01:50:46 +03:00
Weijia Wang
3d29de1f5b darwin.apple_sdk_11_0: add mkCc 2023-05-24 16:49:40 +03:00
Randy Eckenrode
2c070763c7
rustPlatform.bindgenHook: use the correct Libsystem on the 11.0 SDK 2023-05-24 08:08:30 -04:00
Weijia Wang
bd7c4e7b36 clang16Stdenv: init 2023-05-11 14:17:40 +03:00
netfox
815d6c0d3e
apple-framework-System: fix System.tbd dangling symbolic link
Contrarily to the other frameworks, System framework's TBD file
is a symlink pointing to `${MacOSX-SDK}/usr/lib/libSystem.B.tbd`.

This produces an error when using the framework, as:

  1. The original file is not copied into the output directory
  2. Even if it was copied, the relative path wouldn't match

Resulting in the symlink being broken and the linker failing when
trying to link `-framework System`.

The fix applied consists in replacing the symbolic link with the
actual file, as this is easier than fixing the link and doesn't
seem to produce any side effects.
2023-04-12 14:37:48 +02:00
Stéphan Kochen
a0537d633f apple_sdk_11_0: simplify SDK unpacking
The SDK was missing SDKSettings files. This is usually not a problem for
Nix builds, because we generate our own fake SDK structure when
necessary (in xcbuild), but not having these files blocks using the
upstream Apple SDK in tooling such as gen-frameworks.py.
2023-03-17 21:30:51 +01:00
Stéphan Kochen
0c3aaf3e6c apple_sdk_11_0: fix circular framework references 2023-03-17 21:30:51 +01:00
Stéphan Kochen
b9e6d1dbc0 apple_sdk_11_0: generate frameworks.nix 2023-03-17 21:30:51 +01:00
Malo Bourgon
7a734f2795 darwin.apple_sdk_11_0: code cleanup 2023-03-04 12:38:03 +11:00
Malo Bourgon
68648fa4c0 darwin.apple_sdk_11_0.clang{12-15}Stdenv: init 2023-03-04 12:34:48 +11:00
Weijia Wang
ab368e702d darwin.apple_sdk_11_0.rustPlatform: init 2023-02-02 17:45:13 -05:00
Stéphan Kochen
f4ae6b252d Revert "darwin.apple_sdk_11_0: add Security dependency on xpc"
This reverts commit 511f21df7c.

In apple_sdk_11_0, the xpc package contains only headers that are
already part of libsystem, so this change did nothing.

For Swift and `-fmodules`, this actually caused an error, because
there was now a duplicate module in the search path.
2023-01-22 10:36:10 +01:00
Sergei Trofimovich
b9b1d958d0 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/development/libraries/qt-6/modules/qtbase.nix
	pkgs/stdenv/linux/make-bootstrap-tools.nix
2023-01-20 21:56:57 +00:00
Weijia Wang
846e4de6e8 darwin.apple_sdk_11_0.libpm: init 2023-01-18 14:58:43 +01:00
toonn
b7590f3429
Merge pull request #189977 from stephank/feat/swift-darwin
swift: split build & Darwin support.
2023-01-17 14:51:00 +01:00
Nick Cao
519ef86421
Merge pull request #209260 from azuwis/sketchybar
sketchybar: 2.8.2 -> 2.12.3
2023-01-17 10:42:09 +08:00
github-actions[bot]
96d361c622
Merge staging-next into staging 2023-01-13 12:02:02 +00:00
K900
2b06f2a986 darwin/apple-sdk-11.0: expose xcodebuild directly 2023-01-12 10:36:42 +03:00
Uri Baghin
ea9c9ba75c
Merge pull request #207123 from divanorama/darwin_security_xpc
darwin.apple_sdk_11_0: add Security dependency on xpc
2023-01-12 08:37:53 +11:00
luxus
c40708f924 darwin.apple_sdk.frameworks.DisplayServices: init
Used by sketchybar
2023-01-10 23:14:00 +08:00
Weijia Wang
ac3c81faa1 darwin.apple_sdk: expose MultitouchSupport 2023-01-03 18:23:33 +01:00
Weijia Wang
198d522594 darwin.apple_sdk.frameworks.DebugSymbols: init 2023-01-02 23:05:36 -05:00
Dmitry Ivankov
511f21df7c darwin.apple_sdk_11_0: add Security dependency on xpc
Some packages like `bazel-watcher` seems to have broken after
9dc3b14859

Where `xpc` was removed from `IOSurface` dependencies.
`CoreServices` were pulling `xpc` via `IOSurface` and so `Security`
didn't break. Now explicit dependency on `xpc` is needed to avoid
errors like
```
In file included from __main__/external/com_github_fsnotify_fsevents/go_1_10_after.go:6:
In file included from /nix/store/2k3mdkl9jvwwzpbfaqhchfiqjq64046b-apple-framework-CoreServices-11.0.0/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39:
In file included from /nix/store/2k3mdkl9jvwwzpbfaqhchfiqjq64046b-apple-framework-CoreServices-11.0.0/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:23:
In file included from /nix/store/2k3mdkl9jvwwzpbfaqhchfiqjq64046b-apple-framework-CoreServices-11.0.0/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23:
In file included from /nix/store/2k3mdkl9jvwwzpbfaqhchfiqjq64046b-apple-framework-CoreServices-11.0.0/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:29:
In file included from /nix/store/2k3mdkl9jvwwzpbfaqhchfiqjq64046b-apple-framework-CoreServices-11.0.0/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43:
In file included from /nix/store/dg51rm1bapffbqvn46bh43km4dhcsy9p-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers/Security.h:87:
/nix/store/dg51rm1bapffbqvn46bh43km4dhcsy9p-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers/SecCode.h:35:10: fatal error: 'xpc/xpc.h' file not found
         ^~~~~~~~~~~
```

Should help with https://github.com/NixOS/nixpkgs/pull/203519
2022-12-21 17:05:16 +01:00
Stéphan Kochen
8ed924c07a swift: compiler only build & darwin support 2022-10-10 21:26:47 +02:00
Stéphan Kochen
6062fd0800 apple_sdk_11_0: Add SwiftUI dependencies 2022-10-10 21:25:44 +02:00
Stéphan Kochen
e23a97700f apple_sdk_11_0: Fix missing CoreVideo include 2022-10-10 21:25:43 +02:00
Stéphan Kochen
6a20451ac0 apple_sdk_11_0: Foundation depends on Combine 2022-10-10 21:25:43 +02:00
Stéphan Kochen
d69453559a apple_sdk_11_0: install swift modules 2022-10-10 21:25:43 +02:00
Theodore Ni
ac6d052fd9
apple_sdk: clean up unused Libsystem parameter 2022-09-20 12:14:51 +02:00
Stéphan Kochen
9dc3b14859
IOSurface: remove xpc dependency 2022-09-20 12:14:50 +02:00
Stéphan Kochen
6515b56871
darwin.apple_sdk_11_0: use stdenv objc4
Stdenv on aarch64-darwin pulls in (bootstrap-stage4) objc4, unlike
x86_64. However derivations that otherwise depend on objc4 would use a
a different objc4 derivation on top of the final stdenv.

Because this library defines an LLVM module, having multiple instances
of it in the import path will interfere with builds.
2022-09-20 12:14:49 +02:00
Stéphan Kochen
a7eb0a180b darwin.Libsystem: add missing modulemaps 2022-08-12 11:54:10 +02:00
Randy Eckenrode
9659c7abce
apple_sdk_11_0: provide SDK-specific callPackage 2022-07-07 07:52:36 -04:00