Commit Graph

110 Commits

Author SHA1 Message Date
Randy Eckenrode
448aed9e81
darwin.apple_sdk: drop unnecessary dependencies 2023-11-02 17:45:58 -04: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
toonn
501dcc2d3e
Merge pull request #234857 from reckenrode/configd-fix
configd: fix build with newer LLVM and bootstrap
2023-06-05 19:26:06 +02:00
Randy Eckenrode
09799e8b80
apple_sdk: fix infinite recursion
The 10.12 SDK uses `xar`, which depends on Python indirectly, which
depends on configd by default. This causes an infinite recuresion when
building configd because it needs SDK headers to build with clang 16.

Fix the infinite recursion by disabling Python support in libxml2 when
building the SDK, and use a minimal Python in the SDK build itself.
2023-06-04 09:31:39 -04:00
Weijia Wang
ff4881996e darwin.apple_sdk_10_12.frameworks.System: init 2023-05-23 21:01:23 +03: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
Kid
862c4f219a apple-sdk: update comment about frameworks version 2022-04-21 19:44:28 -04:00
Jan Tojnar
b8c07facaa Fix eval with nix-env -qas
At least on NixOS, it fails to evaluate as follows:

	$ nix-env -qaPs -f .
	error: attribute '__propagatedImpureHostDeps' missing
2021-11-17 16:28:55 +01:00
Andrew Childs
55dcd99859 root: use pure CoreSymbolication on Darwin
The current build works by linking against CoreSymbolication in
/System/Library/PrivateFrameworks. This is impure and doesn't work in
newer versions of macOS.

See https://github.com/NixOS/nixpkgs/issues/128576
2021-06-29 11:00:05 +09:00
Andrew Childs
257cb1c8e8 print-reexports: rehome, tbd4 support, cross compilation 2021-05-17 00:27:01 +09:00
Calum MacRae
2c82907da4
apple-sdk: generate SkyLight framework outputs 2021-04-16 17:19:17 +01:00
Calum MacRae
914c604a01
apple-sdk: fix PrivateFrameworks symlinks
With the absence of these symlinks, private frameworks aren't exposed
to the linker.
2021-04-16 17:19:17 +01:00
Andrew Childs
5268bf50d2 apple_sdk.libs.sandbox: init 2021-03-20 11:32:32 -04:00
Monson Shao
2467f5e4d2
darwin.apple-sdk: drop appleSdkVersion
In fact no one is using appleSdkVersion, and stdenv is decoupled with sdk.
2021-01-21 00:26:16 +08:00
Ben Siraphob
16d91ee628 pkgs/os-specific: stdenv.lib -> lib 2021-01-17 23:26:08 +07:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Sandro Jäckel
848d1986b8
apple_sdk.frameworks.AVFoundation: Add missing MediaToolbox
This fixes:
/nix/store/7ckpydmlah3j86py3c4f27p0fbkxyzfi-apple-framework-AVFoundation/Library/Frameworks/AVFoundation.framework/Headers/AVAudioMix.h:15:9: fatal error: 'MediaToolbox/MTAudioProcessingTap.h' file not found
2020-12-09 20:10:59 +01:00
Sandro Jäckel
eb1d742813
apple_sdk.frameworks.AVFoundation: Add missing CoreMedia
This fixes apple-framework-AVFoundation/Library/Frameworks/AVFoundation.framework/Headers/AVAsset.h:17:9: fatal error: 'CoreMedia/CMTime.h' file not found
2020-12-09 20:10:59 +01:00
Andrew Childs
f2b81a021e darwin/print-reexports: add an overview comment 2020-11-12 16:57:19 +09:00
Andrew Childs
7e49fb6592 darwin/apple-sdk: explain why Kernel.framework has no .tbd file 2020-11-12 16:57:19 +09:00
Andrew Childs
3456ef6f30 darwin/apple-sdk: use darwin stubs 2020-11-12 00:23:09 +09:00
Andrew Childs
fd33052999 darwin/print-reexports: nixpkgs-specific utility to inspect .tbd files
Used during bootstrap to check that re-exported libraries are not
dangling.
2020-11-12 00:23:09 +09:00
Daiderd Jordan
3987ea9a9d
mpv: add flag for swift on darwin
While we currently don't have a pure swift build on macOS it's possible
to build mpv using the swift compiler from CLT. eg.

    self: super:
    let
      CommandLineTools = "/Library/Developer/CommandLineTools";
    in
    {
      swift = super.stdenv.mkDerivation {
        name = "swift-CommandLineTools-0.0.0";
        phases = [ "installPhase" "fixupPhase" ];

        propagatedBuildInputs = [ self.darwin.DarwinTools ];

        installPhase = ''
            mkdir -p $out/bin $out/lib
            ln -s ${CommandLineTools}/usr/bin/swift $out/bin
            ln -s ${CommandLineTools}/usr/lib/swift $out/lib
            ln -s ${CommandLineTools}/SDKs $out
        '';

        setupHook = builtins.toFile "hook" ''
            addCommandLineTools() {
                echo >&2
                echo "WARNING: this is impure and unreliable, make sure the CommandLineTools are installed!" >&2
                echo "  $ xcode-select --install" >&2
                echo >&2
                [ -d ${CommandLineTools} ]
                export NIX_LDFLAGS+=" -L@out@/lib/swift/macosx"
                export SWIFT=swift
                export SWIFT_LIB_DYNAMIC=@out@/lib/swift/macosx
                export MACOS_SDK_VERSION=$(sw_vers -productVersion | awk -F. '{print $1 "." $2}')
                export MACOS_SDK=@out@/SDKs/MacOSX$MACOS_SDK_VERSION.sdk
            }

            prePhases+=" addCommandLineTools"
        '';

        __impureHostDeps = [ CommandLineTools ];
      };

      mpv = super.mpv.override { swiftSupport = true; };
    }
2020-02-06 14:15:35 +01:00
Daiderd Jordan
6567823996
stdenv: introduce appleSdkVersion and macosVersionMin 2020-01-31 21:52:11 +01:00
hlolli
78b34b5e5b
graalvm8: 19.1.1 -> 19.2.1
- - nixpkgs now with full darwin support
2020-01-18 16:43:03 +01:00
Frederik Rietdijk
bc18cc72dd
Merge pull request #77610 from LnL7/darwin-stdenv-python3
darwin-stdenv: bootstrap with python3
2020-01-15 09:24:57 +01:00
Daiderd Jordan
73db5d8c38
darwin.apple_sdk: python2 -> python3 2020-01-13 11:13:57 +01:00
squalus
9314327dee keepassxc: fix darwin build
- Removed the unnecessary libmicrohttpd dependency, which doesn't
  build on macOS. KeepassXC removed this dependency in 2.1.2
- Fixed a compiler error related to the Touch ID feature by adding a
  dependency on the LocalAuthentication framework
2020-01-08 16:44:14 +01:00
Robin Gloster
edfdd0f3e4
darwin: use dontUnpack instead of phases 2019-12-31 01:24:10 +01:00
Denis Redozubov
7233afc886 apple_sdk: broken link update (#73984) 2019-11-27 14:17:43 -05:00
John Ericson
f1481f2c90 apple-sdk setup hooks: NIX_CFLAGS_COMPILE may be undefined 2019-11-08 13:28:59 -05:00
John Ericson
beda0365a6 darwin private frameworks setup hook: NIX_CFLAGS_COMPILE may be undefined 2019-11-08 13:24:20 -05:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Daiderd Jordan
8ea702a484
darwin-frameworks: add import CoreFoundation to CoreServices 2019-07-03 22:20:09 +02:00
Daiderd Jordan
73d9cac377
darwin-frameworks: replace cf-private and move it's setup-hook
The only remaining use-case for cf-private are symbols that are not
available in the opensource build.  This generally solved the problem
because of it's setup-hook.
2019-07-03 22:20:09 +02:00
Daiderd Jordan
c2b76fa13c
darwin-frameworks: remove CF
CoreFoundation is included by the stdenv, moving the decision of what
version should be used there makes it possible to override it entirely
rather then prepending flags like cf-private does which can be
unreliable.
2019-07-03 22:20:04 +02:00
Matthew Bauer
4e22fe4f63 apple-sdk: add MetalKit 2019-06-23 18:28:36 -04:00
Matthew Bauer
d1f988ca3c darwin: correct framework dependency
AudioUnit depends on AudioToolbox now, so use that to keep
compatibility.
2019-04-26 21:55:03 -04:00
Matthew Bauer
43cda1b854 apple-sdk: add Metal framework for QuartzCore 2019-04-26 21:54:56 -04:00
Matthew Bauer
e3a9b1ea23 apple-sdk: Foundation needs cf-private 2019-04-26 21:54:54 -04:00
Matthew Bauer
4903e825fa apple-sdk: update frameworks location
Some have been removed like:

- DrawSprocket
- DVComponentGlue
2019-04-26 21:54:53 -04:00
Matthew Bauer
d69cc779b5 Revert "Revert "darwin 10.12 commits""
This reverts commit 8505e710e7.
2019-04-20 23:17:04 -04:00
Daiderd Jordan
b4ea47749a
darwin: remove references to Ubiquity.framework
It was removed on recent versions of macOS and these entries break
sandboxing if they don't exist.

	Aborted: while setting up the build environment: getting attributes of path '/System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity': No such file or directory
2019-02-17 15:30:30 +01:00
Daiderd Jordan
f2fadc0e91
darwin: don't include cf-private in framework dependencies
Using cf-private can cause problems, it's better to include it
explicitly in places where it's actually required.
2018-11-05 00:24:04 +01:00
Matthew Bauer
c7ab795274 darwin.security_tool: disallow requiring sdk
As requested by @domenkozar
2018-07-04 15:08:35 -04:00
Matthew Bauer
d7591c44f0 apple_sdk.frameworks.Ruby: remove
This was broken & apparently unused.
2018-07-04 15:01:00 -04:00
Matthew Bauer
db414a2f5e xpc: copy instead of linking to sdk
This prevents the apple sdk from coming into security tool

Fixes #42836
2018-07-02 17:51:38 -04:00
Matthew Bauer
06fa867498 apple_sdk: use multiple outputs 2018-06-09 00:05:38 -04:00