diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 546c944e0c53f..5f095fdbce996 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -194,7 +194,10 @@ with lib.maintainers; }; darwin = { - members = [ toonn ]; + members = [ + reckenrode + toonn + ]; githubTeams = [ "darwin-maintainers" ]; scope = "Maintain Darwin compatibility of packages and Darwin-only packages."; shortName = "Darwin"; diff --git a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh index 75d9484846a8c..79f0546403f7a 100644 --- a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh +++ b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh @@ -79,3 +79,13 @@ if [ ! "$havePlatformVersionFlag" ]; then extraBefore+=(-@darwinPlatform@_version_min "${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@}") fi fi + +mangleVarSingle DEVELOPER_DIR ${role_suffixes[@]+"${role_suffixes[@]}"} + +# Allow wrapped bintools to do something useful when no `DEVELOPER_DIR` is set, which can happen when +# the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. +DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} + +# Darwin looks for frameworks in the SDK located at `DEVELOPER_DIR`. +extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks") +extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib") diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index b64e97345ab5c..868bc8cdae1ff 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -10,6 +10,7 @@ , stdenvNoCC , runtimeShell , bintools ? null, libc ? null, coreutils ? null, gnugrep ? null +, apple-sdk ? null , netbsd ? null , sharedLibraryLoader ? if libc == null then @@ -107,7 +108,8 @@ let coreutils_bin = optionalString (!nativeTools) (getBin coreutils); # See description in cc-wrapper. - suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; + suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config + + lib.optionalString (targetPlatform.isDarwin && targetPlatform.isStatic) "_static"; # The dynamic linker has different names on different platforms. This is a # shell glob that ought to match it. @@ -412,6 +414,9 @@ stdenvNoCC.mkDerivation { inherit dynamicLinker targetPrefix suffixSalt coreutils_bin; inherit bintools_bin libc_bin libc_dev libc_lib; default_hardening_flags_str = builtins.toString defaultHardeningFlags; + } // lib.optionalAttrs (apple-sdk != null && stdenvNoCC.targetPlatform.isDarwin) { + # Wrapped compilers should do something useful even when no SDK is provided at `DEVELOPER_DIR`. + fallback_sdk = apple-sdk.__spliced.buildTarget or apple-sdk; }; meta = diff --git a/pkgs/build-support/cc-wrapper/add-flags.sh b/pkgs/build-support/cc-wrapper/add-flags.sh index 2c3dc8884023b..cd5396f45f8b4 100644 --- a/pkgs/build-support/cc-wrapper/add-flags.sh +++ b/pkgs/build-support/cc-wrapper/add-flags.sh @@ -78,12 +78,28 @@ if [ -e @out@/nix-support/cc-cflags-before ]; then NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@="$(< @out@/nix-support/cc-cflags-before) $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@" fi -# Only add darwin min version flag if a default darwin min version is set, +# Only add darwin min version flag and set up `DEVELOPER_DIR` if a default darwin min version is set, # which is a signal that we're targetting darwin. if [ "@darwinMinVersion@" ]; then mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"} NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@="-m@darwinPlatformForCC@-version-min=${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@} $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@" + + # `DEVELOPER_DIR` is used to dynamically locate libSystem (and the SDK frameworks) based on the SDK at that path. + mangleVarSingle DEVELOPER_DIR ${role_suffixes[@]+"${role_suffixes[@]}"} + + # Allow wrapped compilers to do something useful when no `DEVELOPER_DIR` is set, which can happen when + # the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. + DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} + + # xcbuild needs `SDKROOT` to be the name of the SDK, which it sets in its own wrapper, + # but compilers expect it to point to the absolute path. + SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" + + # Set up various library paths since compilers may not support (or may have disabled) finding them in the sysroot. + NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@+=" -isysroot $SDKROOT" + NIX_CFLAGS_COMPILE_@suffixSalt@+=" -idirafter $SDKROOT/usr/include" + NIX_CFLAGS_COMPILE_@suffixSalt@+=" -iframework $SDKROOT/System/Library/Frameworks" fi # That way forked processes will not extend these environment variables again. diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 01f91b408e382..34b23acc80e34 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -10,6 +10,7 @@ , stdenvNoCC , runtimeShell , cc ? null, libc ? null, bintools, coreutils ? null +, apple-sdk ? null , zlib ? null , nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" , propagateDoc ? cc != null && cc ? man @@ -114,7 +115,8 @@ let # without interfering. For the moment, it is defined as the target triple, # adjusted to be a valid bash identifier. This should be considered an # unstable implementation detail, however. - suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; + suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config + + lib.optionalString (targetPlatform.isDarwin && targetPlatform.isStatic) "_static"; useGccForLibs = useCcForLibs && libcxx == null @@ -749,6 +751,9 @@ stdenvNoCC.mkDerivation { inherit libc_bin libc_dev libc_lib; inherit darwinPlatformForCC darwinMinVersion darwinMinVersionVariable; default_hardening_flags_str = builtins.toString defaultHardeningFlags; + } // lib.optionalAttrs (apple-sdk != null && stdenvNoCC.targetPlatform.isDarwin) { + # Wrapped compilers should do something useful even when no SDK is provided at `DEVELOPER_DIR`. + fallback_sdk = apple-sdk.__spliced.buildTarget or apple-sdk; }; meta = diff --git a/pkgs/by-name/ap/apple-sdk/README.md b/pkgs/by-name/ap/apple-sdk/README.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/pkgs/by-name/ap/apple-sdk/common/add-core-symbolication.nix b/pkgs/by-name/ap/apple-sdk/common/add-core-symbolication.nix new file mode 100644 index 0000000000000..7bb655a1863b7 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/add-core-symbolication.nix @@ -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="; + }; + + 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 + ]; + + 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 + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/derivation-options.nix b/pkgs/by-name/ap/apple-sdk/common/derivation-options.nix new file mode 100644 index 0000000000000..361e8df0f8d16 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/derivation-options.nix @@ -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 + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix b/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix new file mode 100644 index 0000000000000..d96c27509ddac --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix @@ -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 + + # SDKs are inconsistent about whether MacOSX.sdk or MacOSX.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" + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/passthru-private-frameworks.nix b/pkgs/by-name/ap/apple-sdk/common/passthru-private-frameworks.nix new file mode 100644 index 0000000000000..7d3897dc1dcc4 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/passthru-private-frameworks.nix @@ -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; + }; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix b/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix new file mode 100644 index 0000000000000..cf23ea7214bcf --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/passthru-source-release-files.nix @@ -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; + }; + }; +} diff --git a/pkgs/development/tools/xcbuild/platforms.nix b/pkgs/by-name/ap/apple-sdk/common/plists.nix similarity index 88% rename from pkgs/development/tools/xcbuild/platforms.nix rename to pkgs/by-name/ap/apple-sdk/common/plists.nix index 333e5471b976f..581635694a769 100644 --- a/pkgs/development/tools/xcbuild/platforms.nix +++ b/pkgs/by-name/ap/apple-sdk/common/plists.nix @@ -1,7 +1,10 @@ -{ stdenv, runCommand, lib, sdks, xcodePlatform, writeText }: +{ + lib, + stdenvNoCC, + xcodePlatform, +}: let - inherit (lib.generators) toPlist; Info = { @@ -10,11 +13,7 @@ let Name = lib.toLower xcodePlatform; }; - Version = { - ProjectName = "OSXPlatformSupport"; - }; - - # These files are all based off of Xcode spec fies found in + # These files are all based off of Xcode spec files found in # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/PrivatePlugIns/IDEOSXSupportCore.ideplugin/Contents/Resources. # Based off of the "MacOSX Architectures.xcspec" file. All i386 stuff @@ -24,14 +23,20 @@ let Identifier = "Standard"; Type = "Architecture"; Name = "Standard Architectures (Apple Silicon, 64-bit Intel)"; - RealArchitectures = [ "arm64" "x86_64" ]; + RealArchitectures = [ + "arm64" + "x86_64" + ]; ArchitectureSetting = "ARCHS_STANDARD"; } { Identifier = "Universal"; Type = "Architecture"; Name = "Universal (Apple Silicon, 64-bit Intel)"; - RealArchitectures = [ "arm64" "x86_64" ]; + RealArchitectures = [ + "arm64" + "x86_64" + ]; ArchitectureSetting = "ARCHS_STANDARD_32_64_BIT"; } { @@ -44,11 +49,14 @@ let Identifier = "Standard64bit"; Type = "Architecture"; Name = "Apple Silicon, 64-bit Intel"; - RealArchitectures = [ "arm64" "x86_64" ]; + RealArchitectures = [ + "arm64" + "x86_64" + ]; ArchitectureSetting = "ARCHS_STANDARD_64_BIT"; } { - Identifier = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64"; + Identifier = stdenvNoCC.hostPlatform.darwinArch; Type = "Architecture"; Name = "Apple Silicon or Intel 64-bit"; } @@ -56,7 +64,10 @@ let Identifier = "Standard_Including_64_bit"; Type = "Architecture"; Name = "Standard Architectures (including 64-bit)"; - RealArchitectures = [ "arm64" "x86_64" ]; + RealArchitectures = [ + "arm64" + "x86_64" + ]; ArchitectureSetting = "ARCHS_STANDARD_INCLUDING_64_BIT"; } ]; @@ -283,19 +294,14 @@ let } ]; + ToolchainInfo = { + Identifier = "com.apple.dt.toolchain.XcodeDefault"; + }; in - -runCommand "Platforms" {} '' - platform=$out/${xcodePlatform}.platform - - install -D ${writeText "Info.plist" (toPlist {} Info)} $platform/Info.plist - install -D ${writeText "version.plist" (toPlist {} Version)} $platform/version.plist - install -D ${writeText "Architectures.xcspec" (toPlist {} Architectures)} $platform/Developer/Library/Xcode/Specifications/Architectures.xcspec - install -D ${writeText "PackageTypes.xcspec" (toPlist {} PackageTypes)} $platform/Developer/Library/Xcode/Specifications/PackageTypes.xcspec - install -D ${writeText "ProductTypes.xcspec" (toPlist {} ProductTypes)} $platform/Developer/Library/Xcode/Specifications/ProductTypes.xcspec - - ln -s $platform $platform/usr - - mkdir -p $platform/Developer - ln -s ${sdks} $platform/Developer/SDKs -'' +{ + "Info.plist" = builtins.toFile "Info.plist" (toPlist { } Info); + "ToolchainInfo.plist" = builtins.toFile "ToolchainInfo.plist" (toPlist { } ToolchainInfo); + "Architectures.xcspec" = builtins.toFile "Architectures.xcspec" (toPlist { } Architectures); + "PackageTypes.xcspec" = builtins.toFile "PackageTypes.xcspec" (toPlist { } PackageTypes); + "ProductTypes.xcspec" = builtins.toFile "ProductTypes.xcspec" (toPlist { } ProductTypes); +} diff --git a/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix b/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix new file mode 100644 index 0000000000000..840415d2e3b1e --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix @@ -0,0 +1,46 @@ +let + removedDylibs = [ + # corecrypto is available under a very restrictive license (effectively: non-free, can’t use). + # Without the headers and not being able to use corecrypto due to its license, it’s not very useful. + # Stubs are included in the SDK for all dylibs, including corecrypto. They should be removed. + "/usr/lib/system/libcorecrypto.dylib" + ]; +in + +{ + lib, + jq, + libtapi, +}: + +self: super: { + nativeBuildInputs = super.nativeBuildInputs or [ ] ++ [ + jq + libtapi + ]; + + buildPhase = + super.buildPhase or "" + + '' + echo "Removing the following dylibs from the libSystem reexported libraries list: ${lib.escapeShellArg (lib.concatStringsSep ", " removedDylibs)}" + for libSystem in libSystem.B.tbd libSystem.B_asan.tbd; do + test ! -e usr/lib/$libSystem && continue # TODO: remove once the minimum SDK is 10.14 or newer. + tapi stubify --filetype=tbd-v5 usr/lib/$libSystem -o usr/lib/$libSystem # tbd-v5 is a JSON-based format. + jq --argjson libs ${lib.escapeShellArg (builtins.toJSON removedDylibs)} ' + if .libraries then + .libraries[] |= select(.install_names[] | any([.] | inside($libs)) | not) + else + . + end + | .main_library.reexported_libraries[].names[] |= select([.] | inside($libs) | not) + ' usr/lib/$libSystem > usr/lib/$libSystem~ + mv usr/lib/$libSystem~ usr/lib/$libSystem + done + + # Rewrite the text-based stubs to v4 using `tapi`. This ensures a consistent format between SDK versions. + # tbd-v4 also drops certain elements that are no longer necessary (such as GUID lists). + find . -name '*.tbd' -type f \ + -exec echo "Converting {} to tbd-v4" \; \ + -exec tapi stubify --filetype=tbd-v4 {} -o {} \; + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix new file mode 100644 index 0000000000000..f4d80eed0b498 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix @@ -0,0 +1,71 @@ +{ + lib, + cups, + darwin, + db, + libiconv, + ncurses, + stdenv, + stdenvNoCC, + xcbuild, +}: + +let + # CUPS has too many dependencies to build as part of the Darwin bootstrap. It’s also typically taken as an explicit + # dependency by other packages, so building only the headers (to satisfy other SDK headers) should be okay. + cupsHeaders = darwin.bootstrapStdenv.mkDerivation { + pname = "${lib.getName cups}-headers"; + version = lib.getVersion cups; + + inherit (cups) src; + + patches = cups.patches or [ ]; + + strictDeps = true; + + dontBuild = true; + + buildInputs = [ darwin.libresolv ]; # The `configure` script requires libresolv headers. + + # CUPS’s configure script fails to find `ar` when cross-compiling. + configureFlags = [ "ac_cv_path_AR=${stdenv.cc.targetPrefix}ar" ]; + + installTargets = [ "install-headers" ]; + + __structuredAttrs = true; + + meta = { + inherit (cups.meta) + homepage + description + license + maintainers + platforms + ; + }; + }; +in +self: super: { + # These packages are propagated only because other platforms include them in their libc (or otherwise by default). + # Reducing the number of special cases required to support Darwin makes supporting it easier for package authors. + propagatedBuildInputs = + super.propagatedBuildInputs or [ ] + ++ [ + libiconv + darwin.libresolv + darwin.libsbuf + # Required by some SDK headers + cupsHeaders + ] + # x86_64-darwin links the object files from Csu when targeting very old releases + ++ lib.optionals stdenvNoCC.hostPlatform.isx86_64 [ darwin.Csu ]; + + # The Darwin module for Swift requires certain headers to be included in the SDK (and not just be propagated). + buildPhase = + super.buildPhase or "" + + '' + for header in '${lib.getDev libiconv}/include/'* '${lib.getDev ncurses}/include/'*; do + ln -s "$header" "usr/include/$(basename "$header")" + done + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/propagate-xcrun.nix b/pkgs/by-name/ap/apple-sdk/common/propagate-xcrun.nix new file mode 100644 index 0000000000000..441b36698688e --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/propagate-xcrun.nix @@ -0,0 +1,50 @@ +{ + lib, + pkgsBuildHost, + stdenv, + stdenvNoCC, +}: + +let + plists = import ./plists.nix { + inherit lib stdenvNoCC; + xcodePlatform = if stdenvNoCC.hostPlatform.isMacOS then "MacOSX" else "iPhoneOS"; + }; + inherit (pkgsBuildHost) darwin cctools xcbuild; +in +self: super: { + propagatedNativeBuildInputs = super.propagatedNativeBuildInputs or [ ] ++ [ xcbuild.xcrun ]; + + postInstall = + super.postInstall or "" + + '' + specspath=$out/Library/Xcode/Specifications + toolchainsPath=$out/Toolchains/XcodeDefault.xctoolchain + mkdir -p "$specspath" "$toolchainsPath" + + # xcbuild expects to find things relative to the plist locations. If these are linked instead of copied, + # it won’t find any platforms or SDKs. + cp '${plists."Info.plist"}' "$platformPath/Info.plist" + cp '${plists."ToolchainInfo.plist"}' "$toolchainsPath/ToolchainInfo.plist" + + for spec in '${xcbuild}/Library/Xcode/Specifications/'*; do + ln -s "$spec" "$specspath/$(basename "$spec")" + done + cp '${plists."Architectures.xcspec"}' "$specspath/Architectures.xcspec" + cp '${plists."PackageTypes.xcspec"}' "$specspath/PackageTypes.xcspec" + cp '${plists."ProductTypes.xcspec"}' "$specspath/ProductTypes.xcspec" + + mkdir -p "$out/usr/bin" + ln -s '${xcbuild.xcrun}/bin/xcrun' "$out/usr/bin/xcrun" + + # Include `libtool` in the toolchain, so `xcrun -find libtool` can find it without requiring `cctools.libtool` + # as a `nativeBuildInput`. + mkdir -p "$toolchainsPath/usr/bin" + ln -s '${cctools.libtool}/bin/${stdenv.cc.targetPrefix}libtool' "$toolchainsPath/usr/bin/libtool" + + # Include additional binutils required by some packages (such as Chromium). + for tool in lipo nm otool size strip; do + ln -s '${darwin.binutils-unwrapped}/bin/${stdenv.cc.targetPrefix}'$tool "$toolchainsPath/usr/bin/$tool" + done + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/remove-disallowed-packages.nix b/pkgs/by-name/ap/apple-sdk/common/remove-disallowed-packages.nix new file mode 100644 index 0000000000000..c771b2ccb9f59 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/remove-disallowed-packages.nix @@ -0,0 +1,35 @@ +let + # This can be made unconditional once jq is available in the bootstrap tools. If corecrypto is not removed from + # the umbrella framework, linking will fail in stage 1 because it can’t find the tbd. + disallowedPackages' = builtins.fromJSON (builtins.readFile ../metadata/disallowed-packages.json); +in + +{ + lib, + jq, + stdenv, +}: + +let + disallowedPackages = + if jq == null then + lib.filter (p: p.package != "corecrypto") disallowedPackages' + else + disallowedPackages'; +in +self: super: { + # Remove headers and stubs for packages that are available in nixpkgs. + buildPhase = + super.buildPhase or "" + + '' + ${lib.concatMapStringsSep "\n" ( + pkg: + lib.concatLines ( + [ ''echo "Removing headers and libraries from ${pkg.package}"'' ] + ++ (map (header: "rm -rf -- usr/include/${header}") pkg.headers or [ ]) + ++ (map (framework: "rm -rf -- System/Library/Frameworks/${framework}") pkg.frameworks or [ ]) + ++ (map (library: "rm -rf -- usr/lib/${library}") pkg.libraries or [ ]) + ) + ) disallowedPackages} + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix b/pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix new file mode 100644 index 0000000000000..0eca6b8836b38 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix @@ -0,0 +1,18 @@ +{ lib, sdkVersion }: + +let + name = "MacOSX${lib.versions.majorMinor sdkVersion}.sdk"; +in +self: super: { + # Rewrite the stubs to point to dylibs in the SDK instead of at system locations. This is needed for umbrella + # frameworks in older SDKs, which don’t also embed their stubs. + buildPhase = + super.buildPhase or "" + + '' + echo "Rewriting stubs to reference the SDK location in the store" + find . -name '*.tbd' -type f -exec sed -E \ + -e "/^install-name/n; s|( \\|'\\|\"\\|\\[)/usr/|\1$sdkpath/${name}/usr/|g" \ + -e "/^install-name/n; s|( \\|'\\|\"\\|\\[)/System/|\1$sdkpath/${name}/System/|g" \ + -i {} \; + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/common/run-build-phase-hooks.nix b/pkgs/by-name/ap/apple-sdk/common/run-build-phase-hooks.nix new file mode 100644 index 0000000000000..9ab00665675db --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/common/run-build-phase-hooks.nix @@ -0,0 +1,9 @@ +{ }: + +self: super: { + buildPhase = '' + runHook preBuild + ${super.buildPhase or ""} + runHook postBuild + ''; +} diff --git a/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json b/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json new file mode 100644 index 0000000000000..62cf862049dcb --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json @@ -0,0 +1,1426 @@ +{ + "10.12.2": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-1mCJjZLBMIftcsKC7Ihhzi6LRS3u7kJzh9/dy6MY1Hg=", + "version": "60092.30.2" + }, + "IOAudioFamily": { + "hash": "sha256-5t3D44H/h0cUZqAjMi56BTbJD4o+R0xVdHJ1sZLYgNM=", + "version": "205.11" + }, + "IOBDStorageFamily": { + "hash": "sha256-4NpWcqfkp3UxhKKAwomDK3zxQ9DagyYFUVoUcrHo1Rg=", + "version": "18" + }, + "IOCDStorageFamily": { + "hash": "sha256-XOwdBFunLbwyasnTKQC6MRlXxGns07JvcAQc6AQ1Zt4=", + "version": "56" + }, + "IODVDStorageFamily": { + "hash": "sha256-bbGzqJnenEL9hRyKMBif/381/ETO+yNYHhlnXXWLne0=", + "version": "41.1" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-rhZdjNoZ3OuHVLClhe9tMQU6qJs3IOHEqJ5TaNRJRnM=", + "version": "424" + }, + "IOFireWireFamily": { + "hash": "sha256-adOI5uhd6QL4zpo4MK4ttmS1lcKseqmr68C1D/juGo0=", + "version": "465" + }, + "IOFireWireSBP2": { + "hash": "sha256-5UWldDuSyAnRYjgIKllY4VNbxtAUawrlRS46+8FnbPs=", + "version": "427" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-a/xnnR2dUSWVMyTlkxJPa7cWk20RHl0Zh2Ot2pSEkF0=", + "version": "252" + }, + "IOGraphics": { + "hash": "sha256-63XDVmEHu+KUdr06S7+RPi1BgLcAl4GZZRy+K96CvA0=", + "version": "513.1" + }, + "IOHIDFamily": { + "hash": "sha256-BUDj89w4DrnsIxJZNIx3ZJ85c22HMchIVhJI7xREWTM=", + "version": "870.31.1" + }, + "IOKitUser": { + "hash": "sha256-XJnOp5AtStXUim19GLev8MSM8iS5U8rRSnm7cNp/B80=", + "version": "1324.30.13" + }, + "IONetworkingFamily": { + "hash": "sha256-dL1wSu72uzAAoMdgSjitXgHviioVIGdkDXqwY6HT5/g=", + "version": "116.1.1" + }, + "IOSerialFamily": { + "hash": "sha256-ZcZ5F+a4u2AHThO5WyLn3/o42DR+YDBZKTy4P2EhHhk=", + "version": "91" + }, + "IOStorageFamily": { + "hash": "sha256-IjsG/lgdtW04WH/5rb1QAT563Oy4O5fUrTGuA1kBrkY=", + "version": "210.30.1" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-wyt5CJnNzk0MPC6pg2JAdiwIPxWFJsO9Yqa83vY+hLc=", + "version": "1158.30.7" + }, + "Libinfo": { + "hash": "sha256-3Mu9lOkaQx5gmNPXzr67FnZvKWmQhryIPsN6k95TU18=", + "version": "503.30.1" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-msGtbR53SHXjYN8i74gmkYWGkmqg+TcRO7TY/23XSFQ=", + "version": "165.20.1" + }, + "Librpcsvc": { + "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", + "version": "26" + }, + "Libsystem": { + "hash": "sha256-FwI2aD3wSwES/sKkr014BdFLfsKeEefgS0Pne1FGOp0=", + "version": "1238" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-Ya+ZO3bHNhQ+vZZx/lE7x+uMROHYWYKvm2ZZ1vClu3Q=", + "version": "57740.31.2" + }, + "architecture": { + "hash": "sha256-gHUfKWc1uahI/IATafY1ppPAWnYUghOEXWK2lknAfrQ=", + "version": "268" + }, + "configd": { + "hash": "sha256-i1UjnU7xBh7jCrGZxWMGrldzDrk2dDvjpthp/kq9OKo=", + "version": "888.30.2" + }, + "copyfile": { + "hash": "sha256-pth+37uTfuFY94HuA4b/5GleDjidAuXVsBEQBUa3xCE=", + "version": "138" + }, + "dtrace": { + "hash": "sha256-dK0N3l02241A5S1uvxZhqArHrTxd5Sd4JoAl6RBa8/8=", + "version": "209.20.4" + }, + "dyld": { + "hash": "sha256-wyVsmqYgKLdMKZsLOHzOLag+mBnH0kNS6XAv4zuNTT4=", + "version": "421.2" + }, + "eap8021x": { + "hash": "sha256-XSbzuNXyDJAADcnZed4Akmg1SK8P1IGrZitmhV3wzlo=", + "version": "246.30.1" + }, + "hfs": { + "hash": "sha256-7ByUP59FXmmrxC5yJYUQxrkgt/vY7vZMl5JPQ0HfoS8=", + "version": "366.30.3" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-hfXKQDRdgEDVyT+3v/EuQZyXNd0abD2tICYdQNfhtwY=", + "version": "67" + }, + "libdispatch": { + "hash": "sha256-tj4+6V4FL/XVON13UH71schElTm4/IKtPJH/yoUgRY0=", + "version": "703.30.5" + }, + "libmalloc": { + "hash": "sha256-q9zcUy8YTsRds6RYJMIUIY/MULQ19uKiNduMXP3D7hA=", + "version": "116.30.3" + }, + "libplatform": { + "hash": "sha256-k9Pd+TJCrNS7K100og+6bLAZjV/0VUTy8SIOsc+SE6Q=", + "version": "126.1.2" + }, + "libpthread": { + "hash": "sha256-FJaJO4lXIMAIwEmVF6mHE4ZZZoPI8ZIVuMKLojEsESE=", + "version": "218.30.1" + }, + "mDNSResponder": { + "hash": "sha256-LYDkkmgyfWKK6AMINXyrXo5kw7+lxUcz+4Ckq9175vA=", + "version": "765.30.11" + }, + "objc4": { + "hash": "sha256-WfhJo+/KPGr3/OuV5Kg2no48UR7VVVarh9TB3VFSCQ4=", + "version": "706" + }, + "ppp": { + "hash": "sha256-eW62wL8C1GZ2+5aN0dTPsdoEu6FWf+6XEYv8OiEeMfY=", + "version": "838" + }, + "removefile": { + "hash": "sha256-EJYU6eHggyRsezClEWkGJmgePIdtyF4rpFD4kSK5Czw=", + "version": "45" + }, + "xnu": { + "hash": "sha256-pkELzbsWPtm9H31LaRkaVjkQpPDxG9E93TNS+K9nqhE=", + "version": "3789.31.2" + } + }, + "10.13.2": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-3vx4HPlHP8PNi1GodeRh2iOEhyRBct3vX0Guc8060+I=", + "version": "60118.30.2" + }, + "IOAudioFamily": { + "hash": "sha256-UG09Dc+up5cJKDHPpCmo11IsBchqZ72hVBPx8y+1klw=", + "version": "206.5" + }, + "IOBDStorageFamily": { + "hash": "sha256-aaS5jWPRX4be8d3Rigq+kXzi9Zwbr8dHcNgcIz0n66o=", + "version": "19" + }, + "IOCDStorageFamily": { + "hash": "sha256-U6v+Gj+IumU8Aha5+uf3yOU0Z4KMuBh7aXnJqiZ/abY=", + "version": "58" + }, + "IODVDStorageFamily": { + "hash": "sha256-JLp4xN0Rdb2VpuXtVTODYNqQthDEZk+g/lvHRwJHQB4=", + "version": "42" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-4JS+oezknezxud2E2ojYdSx7A8Z9Q4rddetAoUMU1es=", + "version": "425" + }, + "IOFireWireFamily": { + "hash": "sha256-+FPlhMN2h1iCg1GAqH8+MwHG3GIs4DvvE3QGABX+3Rg=", + "version": "468" + }, + "IOFireWireSBP2": { + "hash": "sha256-5UWldDuSyAnRYjgIKllY4VNbxtAUawrlRS46+8FnbPs=", + "version": "427" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-a/xnnR2dUSWVMyTlkxJPa7cWk20RHl0Zh2Ot2pSEkF0=", + "version": "252" + }, + "IOGraphics": { + "hash": "sha256-E0wDkVmSeEcyO6L6OeWEQuZ0Ggh7MUkfqeQ9uLUEK/g=", + "version": "517.22" + }, + "IOHIDFamily": { + "hash": "sha256-9FhH53LyP1Yv2/afmr/lpNhl/GNFb/Yg+VpG5Ycg300=", + "version": "1035.30.15" + }, + "IOKitUser": { + "hash": "sha256-LebulFJ4KJ5Vbcjj6SC70cmed/0vhCVYo5qDxCw85SE=", + "version": "1445.31.1" + }, + "IONetworkingFamily": { + "hash": "sha256-gXGFCSn6JnHOVaRKhGXFYdvJBo/AGBMDrUdIcw/CwqI=", + "version": "124.30.1" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-Jo+0XlNi82KGksyrvUGyVPfmPMlTrDmZ75DT2lH66TY=", + "version": "218.30.1" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-js2xU5dMF5j209F9Cufuq5WzqcyNusbJDyuPpMgYEZU=", + "version": "1244.30.3" + }, + "Libinfo": { + "hash": "sha256-pVVLb8eOuLVc4HHGcgpl7dqT+Tg2xqKQIQroyLj5OEg=", + "version": "517.30.1" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-nsWWqelTEP4nPJI3vG897zpSOxYOgpm8TUVJ04MrWU4=", + "version": "172" + }, + "Librpcsvc": { + "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", + "version": "26" + }, + "Libsystem": { + "hash": "sha256-+VFJoiqEtXUcP8ERUxtrKwTWZmgdppr+0oPUxSgIF+c=", + "version": "1252" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-W3bSTDCjj2ftq0wbDp+Z8QfD6TpF4p0fLrVjx2AmvfY=", + "version": "58286.31.2" + }, + "architecture": { + "hash": "sha256-gHUfKWc1uahI/IATafY1ppPAWnYUghOEXWK2lknAfrQ=", + "version": "268" + }, + "configd": { + "hash": "sha256-1YGIbAES4OONFtC2xxXWbM7Htlz2kKtFUULWqBB6fz0=", + "version": "963.30.1" + }, + "copyfile": { + "hash": "sha256-CYTZwieSu1Fm9TLaaevfxDngAPRkEfewY+TgJrREed8=", + "version": "146.30.2" + }, + "dtrace": { + "hash": "sha256-sgLSbCp9tYZ7ws2jgxB3NaAk+ijsIbmybsi0gkbZjFQ=", + "version": "262" + }, + "dyld": { + "hash": "sha256-b1hM+iQl7ihRjHRL4Rcg5AHv5HSyKErVkTb+5KFF2P4=", + "version": "519.2.2" + }, + "eap8021x": { + "hash": "sha256-KZsnzH5JiLfzY3zjMAlJRPCGY5EioW6aDJnMAemZJUY=", + "version": "264.30.3" + }, + "hfs": { + "hash": "sha256-Ine8EFpW1kuNDn/r66abGyvYm+NSGI5TV3v/OlgyIME=", + "version": "407.30.1" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-hfXKQDRdgEDVyT+3v/EuQZyXNd0abD2tICYdQNfhtwY=", + "version": "67" + }, + "libdispatch": { + "hash": "sha256-rvsvtv9VncLxQHoURBBczrTaSgbw5827Qf2TxAPopqA=", + "version": "913.30.4" + }, + "libmalloc": { + "hash": "sha256-VM5jHQYqDkoGmrQ2UugTu+XOLjd1YPqdfddzQkKfhiY=", + "version": "140.1.1" + }, + "libplatform": { + "hash": "sha256-zQ3MYqQoMCsfgG6frwnG3LfKWwauTzgwhoADXVUiGR0=", + "version": "161.20.1" + }, + "libpthread": { + "hash": "sha256-6NLKbnBXikSfqz0ZWF6MOIq/bQK/CmfQNvkNXCU6lcw=", + "version": "301.30.1" + }, + "mDNSResponder": { + "hash": "sha256-anzilyXeGh8LL3cYvuLRdqGzhHUvSp9eILJWAltL18M=", + "version": "878.30.4" + }, + "objc4": { + "hash": "sha256-+4o+EzD0YQhgfTg/W9SbVDol7wWUIFxVAVTGg4OVfHQ=", + "version": "723" + }, + "ppp": { + "hash": "sha256-eUIFlYHsAPRrBS0TpTP1/TacaK8h/5QM2Xl1T46MdWc=", + "version": "847" + }, + "removefile": { + "hash": "sha256-EJYU6eHggyRsezClEWkGJmgePIdtyF4rpFD4kSK5Czw=", + "version": "45" + }, + "xnu": { + "hash": "sha256-x2k0KyNk4mIodXfYDHjaCKR1CsiE3HYBNN6p5SfGIMU=", + "version": "4570.31.3" + } + }, + "10.14.6": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-hqsLaS7LEPu8t/bNuV4VUUbMteCetf3/o8e2X0iQvOo=", + "version": "60118.250.2" + }, + "IOAudioFamily": { + "hash": "sha256-UG09Dc+up5cJKDHPpCmo11IsBchqZ72hVBPx8y+1klw=", + "version": "206.5" + }, + "IOBDStorageFamily": { + "hash": "sha256-aaS5jWPRX4be8d3Rigq+kXzi9Zwbr8dHcNgcIz0n66o=", + "version": "19" + }, + "IOCDStorageFamily": { + "hash": "sha256-U6v+Gj+IumU8Aha5+uf3yOU0Z4KMuBh7aXnJqiZ/abY=", + "version": "58" + }, + "IODVDStorageFamily": { + "hash": "sha256-JLp4xN0Rdb2VpuXtVTODYNqQthDEZk+g/lvHRwJHQB4=", + "version": "42" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-EXGpObJVC0b9X3xxEXJScDlM6xygmK3MoCbng21XCmg=", + "version": "426" + }, + "IOFireWireFamily": { + "hash": "sha256-a8zEWhwQTzgGKg75RBmDXb1pgJr602IxnPBTFkKEqSM=", + "version": "473" + }, + "IOFireWireSBP2": { + "hash": "sha256-lpYBTL9TzreyxJn4J3vfuXoWMH/4y8FnNKk5YiuDgHI=", + "version": "433" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-4Y+5+5cJtolSrM3AUnnhSBS3RrKXbg9Kh1ynmllOA2E=", + "version": "252.250.2" + }, + "IOGraphics": { + "hash": "sha256-QFT+h0gtc7SUf0HNciknG0aMOQXnsWCR25C04dgK1/A=", + "version": "530.66" + }, + "IOHIDFamily": { + "hash": "sha256-DpYcxGLvk10iz5TG2SO8R+5obEJv+zLK56RzA/pH0KA=", + "version": "1090.270.6" + }, + "IOKitUser": { + "hash": "sha256-QH2m6BCYtO2JDksH0TebrEldjjZdC4U9otVu/uUoyWY=", + "version": "1483.260.4" + }, + "IONetworkingFamily": { + "hash": "sha256-M01+Bhf7CTJMA7StjSRFW6ffq7Qf/IOh7aM+JI3ONe8=", + "version": "129.200.1" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-X6s/IyApMQ7zo1wO7IpIk1e94tSsmvvT+fZHThMWv5Y=", + "version": "218.260.1" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-mhhs8U/oZku9o2kqzLW4K8Xv9QbnKNBbBr+Q6NqC1vQ=", + "version": "1272.250.1" + }, + "Libinfo": { + "hash": "sha256-DUbyWZI+n3WvftlI7aj60CoEHb9y18H1+FYiYQroVEE=", + "version": "517.200.9" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-q0ns85I9Zwo5bZPN5JqjrJofY8/XLl+mbsRhyF1kx+o=", + "version": "172.200.21" + }, + "Librpcsvc": { + "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", + "version": "26" + }, + "Libsystem": { + "hash": "sha256-Lo4S7fsepuYlRtXGcVvNTAlx/soabjvKEUuiO09htNs=", + "version": "1252.250.1" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-uqSRU4Ft7+zMQ59FBS+Mu2JcWdbbuWP9/dFfo+Vkr5s=", + "version": "58286.270.3.0.1" + }, + "architecture": { + "hash": "sha256-WGUNtFSBu9AuefHVEO3uB/JpKEGAgGFX/zRaaW4eYbI=", + "version": "272.230.1" + }, + "configd": { + "hash": "sha256-Pg58INpZfdKXn1EPut2Kzghfjwxaz1Ex+u5KACA2O7g=", + "version": "963.270.3" + }, + "copyfile": { + "hash": "sha256-gbxGQ8Wjt20++Bf+BkZT/R5dpsCnRo8+qUcerv5m7V8=", + "version": "146.250.1" + }, + "dtrace": { + "hash": "sha256-ZbAaH2wmYlgLKtq0bpDoEInZiHMe5Bx84iUQC67ia0E=", + "version": "284.250.4" + }, + "dyld": { + "hash": "sha256-5wtx+4pSAcNEwcE024XwIRorS3ZW/qmvfkY7UGe75ho=", + "version": "655.1.1" + }, + "eap8021x": { + "hash": "sha256-9j+6Hw7w9wdLZxjdRwTACws2obg2/VCgl9ed4+Y4pPg=", + "version": "264.250.6" + }, + "hfs": { + "hash": "sha256-/yf6z0VJkw2pPnVst2qgnSZfO6x9ot/cWT7Aewo3IZ4=", + "version": "407.200.4" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-NHK+yc7M/wc6Sbk24LDejNjBrbcWIg9zrYHlnPXC/Yc=", + "version": "73" + }, + "libdispatch": { + "hash": "sha256-b0WqX3qX/qhUi2l63BrNvaVq167SuIgYGPid92MJ32U=", + "version": "1008.270.1" + }, + "libmalloc": { + "hash": "sha256-1ZvO0LGV4AkDSdtwqfPFgCUbpAVzfKS0msa58tL2WLA=", + "version": "166.251.2" + }, + "libplatform": { + "hash": "sha256-xQqCf+/DpHu/JMbmOpy6jl3np0H7/m1NKWZ21YWaerE=", + "version": "177.270.1" + }, + "libpthread": { + "hash": "sha256-+AuYgLTM5RO3+MbxeE86rPh9WbiTiAl2gHZOAaQRkec=", + "version": "330.250.2" + }, + "mDNSResponder": { + "hash": "sha256-SlrC3LIOndY1DVJ26bnuYQwpLhkV1PHAMJeaE3bMDI4=", + "version": "878.270.2" + }, + "objc4": { + "hash": "sha256-rzDiOE//rUnRyCHM/XUQs9IImKGIFN/0D0IZ7SeGp2s=", + "version": "756.2" + }, + "ppp": { + "hash": "sha256-a0zTwevtC+AAyLV/0+rX9VN5BXc2vaZGArz83VZtiWs=", + "version": "847.200.5" + }, + "removefile": { + "hash": "sha256-23+ivRTPKId9Is5NAwYmVgN7TX2+7v9NONs9u7DrGH4=", + "version": "45.200.2" + }, + "xnu": { + "hash": "sha256-ZRgj214Mmvvcji4OdzRjK/7Xtpz7r69SFmzSvtZNhNU=", + "version": "4903.270.47" + } + }, + "10.15.6": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-HKSRtTnJ6dH5j6Y+PRDQUcPyjwR70PEbRQu3hTM4G0A=", + "version": "60165.120.1" + }, + "IOAudioFamily": { + "hash": "sha256-5lcK8nyjayLBw9j4PPVs8TWwOWcpggKkSXefVGl2rfA=", + "version": "300.2" + }, + "IOBDStorageFamily": { + "hash": "sha256-aaS5jWPRX4be8d3Rigq+kXzi9Zwbr8dHcNgcIz0n66o=", + "version": "19" + }, + "IOCDStorageFamily": { + "hash": "sha256-U6v+Gj+IumU8Aha5+uf3yOU0Z4KMuBh7aXnJqiZ/abY=", + "version": "58" + }, + "IODVDStorageFamily": { + "hash": "sha256-JLp4xN0Rdb2VpuXtVTODYNqQthDEZk+g/lvHRwJHQB4=", + "version": "42" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-7H3WcZC/HuS9xsTNDWRqt+1JzUNK4ndvd4u2ru0GGRE=", + "version": "428" + }, + "IOFireWireFamily": { + "hash": "sha256-hLtd3d5qOsYdnGpMaTSipu9bOIYEHz2rKzNAoJai4dI=", + "version": "475" + }, + "IOFireWireSBP2": { + "hash": "sha256-pHY6okHHotfFjdNsLwRjQX7dWGolBelpD7MEDz4lafY=", + "version": "434" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-Jb70fanuJTNV4IVoKMtMA66oVDR0I/h3JSIymhlKTQU=", + "version": "257" + }, + "IOGraphics": { + "hash": "sha256-sKnJ0MOhT+dFfmMD2gqYmySufh0I9vBI/swjqoCbSHc=", + "version": "576.1" + }, + "IOHIDFamily": { + "hash": "sha256-esiEGEiggFMR7rha6+dYaqiwGM+TlZtLBe8LF/PF0D8=", + "version": "1446.140.2" + }, + "IOKitUser": { + "hash": "sha256-rB5zfJwoBPMpqW5PDM6ppWW07Y2AGS3f0UzXdfPGYYE=", + "version": "1726.140.1" + }, + "IONetworkingFamily": { + "hash": "sha256-T+aDA++nubTHdPpfdAEm6077eJuzsQXHUDEbdlthVBQ=", + "version": "139.140.2" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-vyIN7oru2PN7C4a6RBJomlYs4NaYzmCTBEuWiSXG41M=", + "version": "238.120.1" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-FAifkHs2Kls2ym9/M56o4u2UZfdTKCnqxRbTXOIHyz8=", + "version": "1353.100.2" + }, + "Libinfo": { + "hash": "sha256-syTH8dhWkSPgqRG7p528L7Xx1+ymmqHrCyhUykGhK9s=", + "version": "538" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-7o4GNZde3MkCks2NJdNIXvvtMAOqGEA05M7S8o7j0XQ=", + "version": "241.100.2" + }, + "Librpcsvc": { + "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", + "version": "26" + }, + "Libsystem": { + "hash": "sha256-RNkaoaRl6akbrgjagLd+ncZ2EAdjegIdy7Z/MINoTpc=", + "version": "1281.100.1" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-dlNTEVkgTl3po7ty2wjatGTANBwegpZxBX1ByneqKRU=", + "version": "59306.140.5" + }, + "architecture": { + "hash": "sha256-pIX9pEXE1Xjll9qwiWrMRwqw6G4g0isto/ALHsmkUSc=", + "version": "279" + }, + "configd": { + "hash": "sha256-nKFDfyH1gQtFyda6HBq3E7Tp5EI4O5n/9GYQEFhMIdE=", + "version": "1061.141.1" + }, + "copyfile": { + "hash": "sha256-nEfD/KUk7e32tw9buQYrsy/BAdAfgE9IObdV4nCm37M=", + "version": "166.40.1" + }, + "dtrace": { + "hash": "sha256-dgJ7om5efUQyc9tP6cBeSpahORqV5bzEDcxcVu4TaDg=", + "version": "338.100.1" + }, + "dyld": { + "hash": "sha256-YkFazM/cviJMwPVXHXP2irfgHtOueI2RNrMedWvkH0A=", + "version": "750.6" + }, + "eap8021x": { + "hash": "sha256-/FsmD4mk/kwsocK8x8Gsk3yOBW3pZLcGHxnNcogqjhY=", + "version": "292.40.2" + }, + "hfs": { + "hash": "sha256-vNo2Wd0n6tjG+xtA3OrwB/TOXvLxaLehEY/l9ZBS5Sw=", + "version": "522.100.5" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-A3QTD6bqUy8ahH/XlMuidYNvT92ufeVpwPsZh4ZzQdk=", + "version": "74" + }, + "libdispatch": { + "hash": "sha256-gd56s0C2dKbZoaGNXt3LBfXaEl5A744djFq3G9uoWws=", + "version": "1173.100.2" + }, + "libmalloc": { + "hash": "sha256-1VhkXY8m6vVQ4aaxICtHVQtXDHNV2CsY9UUst0AioMY=", + "version": "283.100.6" + }, + "libplatform": { + "hash": "sha256-Z4Lj9efT1bt6HMAMQvgMc33QdYzrBvieBjmw4W6H9YI=", + "version": "220.100.1" + }, + "libpthread": { + "hash": "sha256-ZHxqq1qVRXPL0psAX+5bcuA5D/FjJnIcm+ctTkTGBJA=", + "version": "416.100.3" + }, + "mDNSResponder": { + "hash": "sha256-CV3GBeO4Ly8/PbZ7Fq55diRzB00VsB2uTvjGo/tqf10=", + "version": "1096.100.3" + }, + "objc4": { + "hash": "sha256-AJwPTnjJMBbSFDppvKyx92RdfmbmwQOvPnU0E0mU+jU=", + "version": "787.1" + }, + "ppp": { + "hash": "sha256-DNmDigQqDKR1ghcn6GaKeDldp6thH2C6+uZKjC3EfkU=", + "version": "862.140.2" + }, + "removefile": { + "hash": "sha256-bkxiq7OEFtEFPwSBi4OxmpRyKWYgeMhnokFfS7RPUnU=", + "version": "48" + }, + "xnu": { + "hash": "sha256-Y/DTtpnT8JQZO5Ijr+tW0IrIOuECcJ+ZvFLCgwrFt2M=", + "version": "6153.141.1" + } + }, + "11.3": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-92v9tuNLqvalwYV4AqQllA8yN9fqGjSpc4MNAmFPrbk=", + "version": "60178.100.1" + }, + "IOAudioFamily": { + "hash": "sha256-dSSbt9ZoL/Tq2xXwvvXsDmD3Xru7igzdK1MxGL1K+Aw=", + "version": "300.6.1" + }, + "IOBDStorageFamily": { + "hash": "sha256-UgLMsQBe1QLzlbScmPmASBN7VH4YBmNOUX2CEDezjmE=", + "version": "20.100.1" + }, + "IOCDStorageFamily": { + "hash": "sha256-w0YhZ38RBfnxSc74Q8r5UdK+WiWOSAX46r5hahHLnSg=", + "version": "59" + }, + "IODVDStorageFamily": { + "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", + "version": "43" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-7H3WcZC/HuS9xsTNDWRqt+1JzUNK4ndvd4u2ru0GGRE=", + "version": "428" + }, + "IOFireWireFamily": { + "hash": "sha256-2xppN8RJ9cxrHWjPQ4bUIjtupPbzfmrm3rXnT/9QVfc=", + "version": "483" + }, + "IOFireWireSBP2": { + "hash": "sha256-kfhmZy8veqI3/XHDtOTKmKj6P7s+j0B+BiAbcjhGq0M=", + "version": "442" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-WDq2Ak72Jw6gYNIKgZkiexA6LzccrPn1kpSbW5U50ek=", + "version": "257.40.1" + }, + "IOGraphics": { + "hash": "sha256-kEP4RWIZwu3ZPIq9IAPUKM0gIXHr8xD50SnGNFCQRcI=", + "version": "585.1" + }, + "IOHIDFamily": { + "hash": "sha256-QASfvttke+AUx55In4DD4vsQGzC3nbe+MugQQ4ddXGU=", + "version": "1633.100.36" + }, + "IOKitUser": { + "hash": "sha256-NQCRrufElx00B7CqqslBi5BTxf5Zs4lcMcJig4Eab0k=", + "version": "1845.100.19" + }, + "IONetworkingFamily": { + "hash": "sha256-HqTKzrX75mMFYYbxNKwPdXmI7h7t/QWuO3W1Qo//zIo=", + "version": "151.40.1" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-dy6CYz/z6SwPw0YfC6GLZO2u62Xy8otMDUNrZ5JhTDY=", + "version": "260.100.1" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-v01g/EtMW/STZQ1neKDMyUGL7sgaCzlwXN0VDaj/Mf0=", + "version": "1439.100.3" + }, + "Libinfo": { + "hash": "sha256-T7KO6zfswjyTIKSdZJCbvfsdqQfPMLj5nheX9iSIl9o=", + "version": "542.40.3" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-vcDjdwB5OiTEUdl8ISezzpoHeFttkdvkulY/YbUOZjk=", + "version": "279.40.4" + }, + "Librpcsvc": { + "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", + "version": "26" + }, + "Libsystem": { + "hash": "sha256-24T9aD4W71prcpr3MnnaU3pfxIzIwkOz39OyhCwPO/E=", + "version": "1292.100.5" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-o5MyyqDpERvNPvbEfXNgqMIq0YpQV0+ju72C9g/9OdI=", + "version": "59754.100.106" + }, + "architecture": { + "hash": "sha256-pIX9pEXE1Xjll9qwiWrMRwqw6G4g0isto/ALHsmkUSc=", + "version": "279" + }, + "configd": { + "hash": "sha256-WEorIW5Vl8E9/aB0RBTY2bhkfVOF3tckjNztGDOOueA=", + "version": "1109.101.1" + }, + "copyfile": { + "hash": "sha256-3BHFM67dvwUpinzF0pSX3QiUbIsqtLo77WzB3tMbTW4=", + "version": "173.40.2" + }, + "dtrace": { + "hash": "sha256-FfyaYjEMDeL9wGdUyZ4eJdkbkp/WpdTGyBvaorwKSi8=", + "version": "370.40.1" + }, + "dyld": { + "hash": "sha256-dtDTh6YqubBI4Z+QeytwGgUmU6tutvonIWHqzw6zuxo=", + "version": "851.27" + }, + "eap8021x": { + "hash": "sha256-Ap7qumn/oKYe424n2NW6QkuivgDyLoJgDfl30Q5O7Jo=", + "version": "304.100.1" + }, + "hfs": { + "hash": "sha256-MSnc1pB8DcB+mn308snTD1uRQ7Ro4aWyFuLdWjHtAG4=", + "version": "556.100.11" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-UgmMnDUosaC2yI7IyQ7mkNwZ6/oft77ay+SmGSoycIw=", + "version": "79" + }, + "libdispatch": { + "hash": "sha256-K8QL9NfjGsj8c0jbocKegmKBqydimpKu8yRXnQQqdH8=", + "version": "1271.100.5" + }, + "libmalloc": { + "hash": "sha256-k3dJk7S0Lom3B28vRI9QxIuo0AOkd9OHzWO7MandfUw=", + "version": "317.100.9" + }, + "libplatform": { + "hash": "sha256-BSIGgKj5B6Dr0KQiIl2LSA3+ZEhzk/snQeCauErcq6k=", + "version": "254.80.2" + }, + "libpthread": { + "hash": "sha256-cGaDXLTztUYppbMvv41qj5RqONXfhfdHpt9dqY6+5Lc=", + "version": "454.100.8" + }, + "mDNSResponder": { + "hash": "sha256-eqcv174vIwWYXrIhzph+KO1zG8TdK5jRFVgsaAlV9es=", + "version": "1310.100.10" + }, + "objc4": { + "hash": "sha256-rqOPyN9S4KbMhCCVvtyEmGxTWzy+tsh0kfu3k47szXo=", + "version": "818.2" + }, + "ppp": { + "hash": "sha256-pSOlu/yXQhopCHDLnmhUnQeU89MkXhkQB0ZrN9r3qyk=", + "version": "877.40.2" + }, + "removefile": { + "hash": "sha256-B79A9AQ1/cB+zlmVKWcEXVOJHW6rOrX40S/hrMuWqXU=", + "version": "49.101.1" + }, + "xnu": { + "hash": "sha256-M1XWippH55VUJu4aosRFX8j9aOm/PONYVjPZOPufD80=", + "version": "7195.101.1" + } + }, + "12.3": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-HTGBUE6vHjS80CFTiIQ8F17m8Yd2ZRHccvFu2CA2P9U=", + "version": "60191.100.1" + }, + "IOAudioFamily": { + "hash": "sha256-CuBFZeX2JTKIab2xpp+Yvn66bCl4+aKOv9TvzJef20c=", + "version": "340.2" + }, + "IOBDStorageFamily": { + "hash": "sha256-UgLMsQBe1QLzlbScmPmASBN7VH4YBmNOUX2CEDezjmE=", + "version": "22" + }, + "IOCDStorageFamily": { + "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", + "version": "61" + }, + "IODVDStorageFamily": { + "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", + "version": "43" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-ruAomp5Lv7zuPu9vHsNKoPtDvD1AIrRARsPMpcx/fh0=", + "version": "430" + }, + "IOFireWireFamily": { + "hash": "sha256-W0KOF4hkA7kFOnL1ThAeFU/YlhFVqoqk9uzGjcBppX8=", + "version": "487" + }, + "IOFireWireSBP2": { + "hash": "sha256-bItnRQIaGUxMyiU0q+4N8e5+jYiDEOUPmsrKhBFXvok=", + "version": "445" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-P7egeaD9SSa+YyrIRzM44gILKbIL7vezXK3M6q3MBOI=", + "version": "260" + }, + "IOGraphics": { + "hash": "sha256-lzxBrPLlF01+2jFKRJtSnwpf0r05C0H3tM7Q0N1RUPA=", + "version": "594" + }, + "IOHIDFamily": { + "hash": "sha256-EQQHAS8WKUoTxZscixylc2ZMoD4UYBlHRUj2O7Ikgac=", + "version": "1787.100.13" + }, + "IOKitUser": { + "hash": "sha256-Cdfa/YXM0W4O15femcU0G1Xcpbm+iADWIBWIdzoeuTE=", + "version": "1955.100.5" + }, + "IONetworkingFamily": { + "hash": "sha256-odUZJQq8lb3UYk7F8dBi1Hds00M+kwdlyGwZkVkSwTg=", + "version": "160.100.2" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-2b32qe1z7Z+Od1dVlAGdM142DdF8cBaRC+ElysSuAQ4=", + "version": "290.100.6" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-obalDxsbE+7gm7YwznUbfxL7MCriamQFP3DrXleNwU4=", + "version": "1507.100.9" + }, + "Libinfo": { + "hash": "sha256-OjnnSHEcifcWarVyXiHvYg/9jbCQy5/lzaq6fJRriy0=", + "version": "554" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-JXG0kHEdoIs6krVZ4+KsRVES4AuNjnQi8qF+XKSp5jE=", + "version": "301" + }, + "Librpcsvc": { + "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", + "version": "26" + }, + "Libsystem": { + "hash": "sha256-mPPAxo67wWLtemO+PuKg1Ui0zKEfjnYVj/qX1/0kNBs=", + "version": "1311.100.3" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-cIqfXcfQOZonxaKndH80xC5YmmveHw+TxHOxqvc9u8I=", + "version": "60158.100.133" + }, + "architecture": { + "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", + "version": "280.100.2" + }, + "configd": { + "hash": "sha256-X34mjXdil4HeBLyqY4tyBWdmpjsOFTJDdDE81UQf708=", + "version": "1163.100.19.0.2" + }, + "copyfile": { + "hash": "sha256-3/zI3j/m9b13hebjCsOLry3Mf8ADdWJgrtQOdD0huG0=", + "version": "180.100.3" + }, + "dtrace": { + "hash": "sha256-q8H6slCN4RwJ5TxC5s3og6cIbjALySP5ODfVw6a/a+M=", + "version": "375" + }, + "dyld": { + "hash": "sha256-v1kk/Z3eI2sufNm2rx3FRbA/f9BeKJ3t9i9W7tTksXg=", + "version": "955" + }, + "eap8021x": { + "hash": "sha256-SayP1d2KWoRShykBA/NrQCuRnPoxlTiaLwifoqm0Gkg=", + "version": "315.100.2" + }, + "hfs": { + "hash": "sha256-q1yOIei98oudGAoBMNPRTV5EOYpXFL7iYmlCYsKsG0o=", + "version": "583.100.10" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-Ez75a0m+fJas7mGqFeDjjpc7sFDnyirRbtLMTYQDVxw=", + "version": "79.1" + }, + "libdispatch": { + "hash": "sha256-/VbSUtnWyToWOUyAAg/3wImbJ2w5k1tbJkt827x2lIE=", + "version": "1325.100.36" + }, + "libmalloc": { + "hash": "sha256-tyYce5nk0N923MbzoGzkGqunoKwArbTiZl8PCppYpso=", + "version": "374.100.5" + }, + "libplatform": { + "hash": "sha256-JUD2NdS310OhZ0F8gnOvoD8AgEtWRtPahKDw5iE2QJU=", + "version": "273.100.5" + }, + "libpthread": { + "hash": "sha256-al8QumtH7/D04oJ4LUSYW+6OdX0Ko3S3rwYU53n9/54=", + "version": "486.100.11" + }, + "mDNSResponder": { + "hash": "sha256-hsV0VYTPoO5YpaxrUXpXFy97LxlERzrQT0FRfCMOwic=", + "version": "1557.101.2" + }, + "objc4": { + "hash": "sha256-MKXnfZL46VtmAQMolqd7ATF9fYjCNstapGQfcH4uVwo=", + "version": "841.13" + }, + "ppp": { + "hash": "sha256-YyCE19T3rcM1G5jdXuYXuBXblJgR/nelvjpq+9maMhw=", + "version": "884" + }, + "removefile": { + "hash": "sha256-xF1VtTUhoiGsFQsvuFnFYemwiCdsKeriFJv51vRLqmw=", + "version": "60" + }, + "xnu": { + "hash": "sha256-bfFmDfRBSvoWMdQYVstsJRbcq+15lDjVFqk+0XYWpy8=", + "version": "8020.101.4" + } + }, + "13.3": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-tftAQbs5xIOc5VZLVAKXAUvle9WO/i33/pQ3D64l/yI=", + "version": "600016.100.4" + }, + "IOAudioFamily": { + "hash": "sha256-CuBFZeX2JTKIab2xpp+Yvn66bCl4+aKOv9TvzJef20c=", + "version": "440.2" + }, + "IOBDStorageFamily": { + "hash": "sha256-UgLMsQBe1QLzlbScmPmASBN7VH4YBmNOUX2CEDezjmE=", + "version": "22" + }, + "IOCDStorageFamily": { + "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", + "version": "61" + }, + "IODVDStorageFamily": { + "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", + "version": "43" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-IUytBKhhCgg0vtI+7q8d5kxpOUgO3tQD7TMy++jrorc=", + "version": "431" + }, + "IOFireWireFamily": { + "hash": "sha256-W0KOF4hkA7kFOnL1ThAeFU/YlhFVqoqk9uzGjcBppX8=", + "version": "487" + }, + "IOFireWireSBP2": { + "hash": "sha256-bItnRQIaGUxMyiU0q+4N8e5+jYiDEOUPmsrKhBFXvok=", + "version": "445" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-P7egeaD9SSa+YyrIRzM44gILKbIL7vezXK3M6q3MBOI=", + "version": "260" + }, + "IOGraphics": { + "hash": "sha256-KubCz8DNwf1WuF7LrtARM2VJugFDP0wfHoUhnIz/faQ=", + "version": "596.1" + }, + "IOHIDFamily": { + "hash": "sha256-7UFMBdF5k9aVFVuoL2riozzKmn8uOt87Aitt8j6XkN8=", + "version": "1915.100.21" + }, + "IOKitUser": { + "hash": "sha256-hgFRHPAuoqSf6aRUBUyfU2y2+dBUA34DKwLHLwhPNms=", + "version": "2022.100.19" + }, + "IONetworkingFamily": { + "hash": "sha256-SwZvXLSB9cMHssZU4dCogGVoV64qYdGN1CGYV3FZ6tk=", + "version": "170" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-g4oCrxM5VtHm8h1M+zM81Ar1LsaaiJZLej5fT8EHPG4=", + "version": "302.100.1" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-dqbdWtBuaRq3IHnSUPH2aj8h/X4zCwUNSOeSdwfKvN8=", + "version": "1534.100.14" + }, + "Libinfo": { + "hash": "sha256-iUyndeUXx7FFZ/jgJ6jRwda3IChOaMs4dZW/ISuAJ1E=", + "version": "564.101.1" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-7AwTfogvCUMdoabxf413ENWXtFTOM6AUldccoPQ89sU=", + "version": "312" + }, + "Librpcsvc": { + "hash": "sha256-UWYdCQ9QsBqwM01bWr+igINAHSdSluB/FrOclC5AjTI=", + "version": "31" + }, + "Libsystem": { + "hash": "sha256-IIksf0yCg3GdME3HofYzD1MRC+ofsPhHcxddmNd7V2M=", + "version": "1319.100.3" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-lPq58QIx+H9DouTXAUJSMf1X7dj9V6xu3c8VWr2R1IY=", + "version": "60420.101.4" + }, + "architecture": { + "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", + "version": "282" + }, + "configd": { + "hash": "sha256-M/fRAnUw2wObhCQp9a6zQbCGhACCQHpju4/1+KGlkjg=", + "version": "1241.100.11" + }, + "copyfile": { + "hash": "sha256-te3WcQudrXPqnTM1s/AtsTdu7VIXf5dIASy+IGnIxv0=", + "version": "191.100.3" + }, + "dtrace": { + "hash": "sha256-7jAG66hG9qmqpRbECazMD1Pyi53CWTOGNnZca1NpcxE=", + "version": "397" + }, + "dyld": { + "hash": "sha256-OkDOTV86EB44LxsqwTD4ZncMcr7iqSHXxw+6U+AP7oU=", + "version": "1066.8" + }, + "eap8021x": { + "hash": "sha256-FMG+IGVPpcwrRe2/OKpFycrY/EFPZkge2vX61NgorGg=", + "version": "336.100.6" + }, + "hfs": { + "hash": "sha256-Au5VDrYRBerI1I6rjC0lVDwB5IBwGARrAdcTI4M+Fx0=", + "version": "627.100.6" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-V1tpp/XG6baETunJt029rI6wp6moYSnFprt+bNGaQ40=", + "version": "87" + }, + "libdispatch": { + "hash": "sha256-d1VObN11bNdtNJlZQqp2y8yP4lit5Wbj+4/aN3StsPc=", + "version": "1415.100.11" + }, + "libmalloc": { + "hash": "sha256-jcR1AO/chcZzfAvELkC+U3q9tzxqPdwgLcHrnkQmN4M=", + "version": "425.100.7" + }, + "libplatform": { + "hash": "sha256-+BB23YGGT0hA326Dh+3k2UvAqBdEJ84A6yGA/ccrihg=", + "version": "292.100.1" + }, + "libpthread": { + "hash": "sha256-/l17vMWhfAs0YhIHi+l84vGVxpGFOzocvxxii7B+WUk=", + "version": "514.100.2" + }, + "mDNSResponder": { + "hash": "sha256-M4yfQsdlKwes5M2QOEEfjv7ldSVZw7oGXLISaDcObjs=", + "version": "1807.101.2" + }, + "objc4": { + "hash": "sha256-qOV9YfP59WP8Izp+IvM/aiYTW8fCoq21uxU64OcIHk8=", + "version": "876" + }, + "ppp": { + "hash": "sha256-Sg5c5qOSk5TaS4pgXZ+eAy/iuGBa1oFML0dkj463DcE=", + "version": "1010" + }, + "removefile": { + "hash": "sha256-oQorWHlJ0ctekCTUsLXHko8k1aCKBJ00A2FHkRd4B3E=", + "version": "68" + }, + "xnu": { + "hash": "sha256-w9/lDZ/E54YzYQkOWptNpX5GomgI/fvZLAy7NY3O+IQ=", + "version": "8796.101.5" + } + }, + "14.4": { + "CarbonHeaders": { + "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", + "version": "18.1" + }, + "CommonCrypto": { + "hash": "sha256-/VoOR9wJuKnmGE1CWGGXxX8SpmALHnEooNTa3QM+ITc=", + "version": "600028.100.1" + }, + "IOAudioFamily": { + "hash": "sha256-VSk3jvsITJugtL67Qt0m4qJ879i7Fj6B/NGBFVCwpiU=", + "version": "540.3" + }, + "IOBDStorageFamily": { + "hash": "sha256-UgLMsQBe1QLzlbScmPmASBN7VH4YBmNOUX2CEDezjmE=", + "version": "22" + }, + "IOCDStorageFamily": { + "hash": "sha256-p/2qM5zjXFDRb/DISpEHxQEdvmuLlRGt/Ygc71Yu2rI=", + "version": "61" + }, + "IODVDStorageFamily": { + "hash": "sha256-1Sa8aZBGNtqJBNHva+YXxET6Wcdm2PgVrTzYT/8qrN4=", + "version": "45" + }, + "IOFWDVComponents": { + "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", + "version": "208" + }, + "IOFireWireAVC": { + "hash": "sha256-IUytBKhhCgg0vtI+7q8d5kxpOUgO3tQD7TMy++jrorc=", + "version": "431" + }, + "IOFireWireFamily": { + "hash": "sha256-W0KOF4hkA7kFOnL1ThAeFU/YlhFVqoqk9uzGjcBppX8=", + "version": "487" + }, + "IOFireWireSBP2": { + "hash": "sha256-bItnRQIaGUxMyiU0q+4N8e5+jYiDEOUPmsrKhBFXvok=", + "version": "445" + }, + "IOFireWireSerialBusProtocolTransport": { + "hash": "sha256-P7egeaD9SSa+YyrIRzM44gILKbIL7vezXK3M6q3MBOI=", + "version": "260" + }, + "IOGraphics": { + "hash": "sha256-Ag37fd3tZJLXLVq1yzHOCWGOYYfwwTkC8hnvNaTEaWg=", + "version": "598" + }, + "IOHIDFamily": { + "hash": "sha256-fmYTJsquAOBwzsgRmqPyjSJJi1hGcfnMmqLIcTe8W1s=", + "version": "2031.100.16" + }, + "IOKitUser": { + "hash": "sha256-1bqRiLvyr2GQfbWwhXHXXIOtIka9YDw5GbKV6bd2k4k=", + "version": "100076.101.1" + }, + "IONetworkingFamily": { + "hash": "sha256-J3cLeWKrQ8ypIaqgwRH9eU5JbjEDBVoezj3a2Lvwu5k=", + "version": "177" + }, + "IOSerialFamily": { + "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", + "version": "93" + }, + "IOStorageFamily": { + "hash": "sha256-cllpJX11c3CX8zEYdOT2TC63sx7NUAHh33yRHhrG2Ro=", + "version": "315" + }, + "IOUSBFamily": { + "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", + "version": "630.4.5" + }, + "Libc": { + "hash": "sha256-fxBM4KbPwQNVEJl7PCKP+1nUk9Oce/O2+0lVBxyngew=", + "version": "1592.100.35" + }, + "Libinfo": { + "hash": "sha256-zZr6Mmou8Q+G6/wS+k0k7R+XirB94TNCUGS5dhi96ZE=", + "version": "583.0.1" + }, + "Libm": { + "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", + "version": "2026" + }, + "Libnotify": { + "hash": "sha256-7X+6S3C7ZOTXJUeDXOOg5EmoZyLZvtE06x3Is0TGgSU=", + "version": "317.100.2" + }, + "Librpcsvc": { + "hash": "sha256-UWYdCQ9QsBqwM01bWr+igINAHSdSluB/FrOclC5AjTI=", + "version": "31" + }, + "Libsystem": { + "hash": "sha256-HsItciWrwyXujQ2hwqzv0JKOkkuynXYIqejLAEPJbMc=", + "version": "1345.100.2" + }, + "OpenDirectory": { + "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", + "version": "146" + }, + "Security": { + "hash": "sha256-NgTGbaw5JkpboDQpt1fSgUr9NYGS+bIOrEMQX7mLAME=", + "version": "61123.100.169" + }, + "architecture": { + "hash": "sha256-PRNUrhzSOrwmxSPkKmV0LV7yEIik65sdkfKdBqcwFhU=", + "version": "282" + }, + "configd": { + "hash": "sha256-+3xesYxqfsNjWCW3T87OA7+Z1hBqmGEh/I8kP8Ajbso=", + "version": "1300.100.9" + }, + "copyfile": { + "hash": "sha256-rSCTgzdHr7QmnPk9rJ9P4fOAolnEQv8PHfgAY+qA0s4=", + "version": "196.100.4" + }, + "dtrace": { + "hash": "sha256-04Q35rCKnM5Csv5poFJKpK0VplWq4hvy251/Cb2Kl80=", + "version": "401.100.3" + }, + "dyld": { + "hash": "sha256-6P/Da6xP19vmaCROoYv9pl7DaW3/U+qZBJT8PD33bn0=", + "version": "1160.6" + }, + "eap8021x": { + "hash": "sha256-Ky6KSlJhyX1NRufGhVBcp+ZFmqYrAxwC/5QvJhC2PhU=", + "version": "354.100.3" + }, + "hfs": { + "hash": "sha256-+YUVOttZU7C8I14CC6t3ZH2KxAjjTA2nB0y5bPgLxZM=", + "version": "650.0.2" + }, + "launchd": { + "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", + "version": "842.1.4" + }, + "libclosure": { + "hash": "sha256-M/jnIHzKYvdFCO0tJ1JXiD/UcZtJhLIoulaCQQUbn30=", + "version": "90" + }, + "libdispatch": { + "hash": "sha256-igqIA5DMVHjG30WMHZZpYY7LRM9hZyMWItD+UxeTehY=", + "version": "1477.100.9" + }, + "libmalloc": { + "hash": "sha256-Sh4/z7lGWRMldOPURkP5vLOAb5Ou6AUsVJEWz9wk9hI=", + "version": "521.100.59" + }, + "libplatform": { + "hash": "sha256-gojt3sWOr7XO2yYI/B1CmNLTPFieSfoNtlOgQahOCok=", + "version": "316.100.10" + }, + "libpthread": { + "hash": "sha256-phjfN8+IU8ibPsflR6LktnSi3giy89ghI+cFyrhiQNo=", + "version": "519.101.1" + }, + "mDNSResponder": { + "hash": "sha256-0ECbWeMnIRTsi03BeBEe5boyR/84JJPbxzPQze8hHSA=", + "version": "2200.100.94.0.2" + }, + "objc4": { + "hash": "sha256-eUVSpbyTEOMEdHoxSv6lZIZwB+cW/YWIaTZTcHgGOjo=", + "version": "912.3" + }, + "ppp": { + "hash": "sha256-8+QUA79sHf85yvGSPE9qCmGsrZDT3NZnbgZVroJw/Hg=", + "version": "1016" + }, + "removefile": { + "hash": "sha256-L6I0u8S3h3uV1veKA5HvkSebbBCd78ymlf//KWbebZo=", + "version": "70.100.4" + }, + "xnu": { + "hash": "sha256-j5Ep1RX5DTJqTGszrF4d/JtzUqZ6nA6XoExqcIQ0RVQ=", + "version": "10063.101.15" + } + } +} diff --git a/pkgs/by-name/ap/apple-sdk/metadata/disallowed-packages.json b/pkgs/by-name/ap/apple-sdk/metadata/disallowed-packages.json new file mode 100644 index 0000000000000..2b31160e00738 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/metadata/disallowed-packages.json @@ -0,0 +1,545 @@ +[ + { + "package": "apache", + "headers": [ + "apache2" + ] + }, + { + "package": "apr", + "headers": [ + "apr-1" + ], + "libraries": [ + "libapr-1.*", + "libaprutil-1.*" + ] + }, + { + "package": "boringssl", + "libraries": [ + "libboringssl.*" + ] + }, + { + "package": "bzip2", + "headers": [ + "bzlib.h" + ], + "libraries": [ + "libbz2.*" + ] + }, + { + "package": "corecrypto", + "libraries": [ + "system/libcorecrypto*" + ] + }, + { + "package": "Csu", + "libraries": [ + "*.o" + ] + }, + { + "package": "cups", + "headers": [ + "cups" + ], + "libraries": [ + "libcups*" + ] + }, + { + "package": "curl", + "headers": [ + "curl" + ], + "libraries": [ + "libcurl.*" + ] + }, + { + "package": "cyrus_sasl", + "headers": [ + "sasl" + ], + "libraries": [ + "libsasl*" + ] + }, + { + "package": "editline", + "headers": [ + "editline.h", + "editline" + ], + "libraries": [ + "libedit.*", + "libeditline.*" + ] + }, + { + "package": "html-tidy", + "headers": [ + "tidy*" + ], + "libraries": [ + "libtidy.*" + ] + }, + { + "package": "hunspell", + "headers": [ + "hunspell" + ], + "libraries": [ + "libhunspell*" + ] + }, + { + "package": "icu", + "headers": [ + "unicode" + ], + "libraries": [ + "libicucore.*" + ] + }, + { + "package": "libarchive", + "headers": [ + "archive.h", + "archive_entry.h" + ], + "libraries": [ + "libarchive.*" + ] + }, + { + "package": "libc++", + "headers": [ + "c++", + "cxxabi.h", + "__cxxabi_config.h" + ], + "libraries": [ + "libc++*" + ] + }, + { + "package": "ld64", + "libraries": [ + "libcodedirectory.*", + "libcodedirectory_static.*" + ] + }, + { + "package": "expat", + "headers": [ + "expat.h", + "expat_config.h", + "expat_external.h" + ], + "libraries": [ + "libexpat.*" + ] + }, + { + "package": "libffi", + "headers": [ + "ffi*" + ], + "libraries": [ + "libffi*" + ] + }, + { + "package": "libgcc", + "libraries": [ + "libgcc*" + ] + }, + { + "package": "libiconv", + "headers": [ + "iconv.h", + "libcharset.h", + "localcharset.h" + ], + "libraries": [ + "libcharset.*", + "libiconv.*", + "i18n" + ] + }, + { + "package": "libiodbc", + "libraries": [ + "libiodbc*" + ] + }, + { + "package": "libkrb4", + "libraries": [ + "libkrb4.*" + ] + }, + { + "package": "libkrb5", + "headers": [ + "com_err.h", + "gssapi", + "gssapi.h", + "gssrpc", + "kadm5", + "kdb.h", + "krad.h", + "krb5", + "krb5.h", + "profile.h", + "verto-module.h", + "verto.h" + ], + "libraries": [ + "krb5", + "libcom_err.*", + "libgssapi_krb5.*", + "libgssrpc.*", + "libk5crypto.*", + "libkadm5clnt.*", + "libkadm5clnt_mit.*", + "libkadm5srv.*", + "libkadm5srv_mit.*", + "libkdb5.*", + "libkrad.*", + "libkrb5*", + "libkrb5support.*", + "libverto.*" + ] + }, + { + "package": "libpcap", + "headers": [ + "pcap*" + ], + "libraries": [ + "libpcap.*" + ] + }, + { + "package": "libresolv", + "headers": [ + "arpa/nameser.h", + "arpa/nameser_compat.h", + "dns.h", + "dns_util.h", + "nameser.h", + "resolv.h" + ], + "libraries": [ + "libresolv.*" + ] + }, + { + "package": "libstdc++", + "libraries": [ + "libstdc++.*" + ] + }, + { + "package": "libsbuf", + "headers": [ + "usbuf.h" + ], + "libraries": [ + "libsbuf.*" + ] + }, + { + "package": "libtermcap", + "headers": [ + "termcap.h" + ], + "libraries": [ + "libtermcap.*" + ] + }, + { + "package": "libutil", + "headers": [ + "libutil.h" + ], + "libraries": [ + "libutil.*", + "libutil1.*" + ] + }, + { + "package": "libxml2", + "headers": [ + "libxml", + "libxml2" + ], + "libraries": [ + "libxml2.*" + ] + }, + { + "package": "libxo", + "headers": [ + "libxo" + ], + "libraries": [ + "libxo.*" + ] + }, + { + "package": "libxslt", + "headers": [ + "libexslt", + "libxslt" + ], + "libraries": [ + "libexslt.*", + "libxslt.*" + ] + }, + { + "package": "liby", + "libraries": [ + "liby.a" + ] + }, + { + "package": "marisa-trie", + "libraries": [ + "libmarisa.*" + ] + }, + { + "package": "ncurses", + "headers": [ + "curses*", + "cursslk.h", + "eti.h", + "etip.h", + "form.h", + "menu.h", + "nc_tparm.h", + "ncurses*", + "panel.h", + "term.h", + "term_entry.h", + "termcap.h", + "tic.h", + "unctrl.h" + ], + "libraries": [ + "libcurses.*", + "libform.*", + "libformw.*", + "libmenu.*", + "libmenuw.*", + "libncurses.*", + "libncursesw.*", + "libpanel.*", + "libpanelw.*", + "libtinfo.*" + ] + }, + { + "package": "net-snmp", + "headers": [ + "net-snmp" + ], + "libraries": [ + "libnetsnmp*" + ] + }, + { + "package": "nghttp", + "libraries": [ + "lib*nghttp2.*" + ] + }, + { + "package": "openblas", + "headers": [ + "cblas.h", + "f77blas.h", + "lapack.h", + "lapacke.h", + "lapacke_config.h", + "lapacke_mangling.h", + "lapacke_utils.h", + "openblas_config.h" + ], + "libraries": [ + "libblas.*", + "libcblas.*", + "libclapack.*", + "libf77lapack.*", + "liblapack.*", + "liblapacke.*", + "libopenblas.*", + "libopenblas.*", + "libopenblasp*" + ] + }, + { + "package": "openldap", + "headers": [ + "lber.h", + "lber_types.h", + "ldap.h", + "ldap_cdefs.h", + "ldap_features.h", + "ldap_schema.h", + "ldap_utf8.h", + "ldif.h", + "openldap.h", + "slapi-plugin.h" + ], + "libraries": [ + "liblber.*", + "liblber_r.*", + "libldap.*", + "libldap_r.*" + ] + }, + { + "package": "openpam", + "headers": [ + "security" + ], + "libraries": [ + "libpam.*", + "pam_*" + ] + }, + { + "package": "pcre", + "headers": [ + "pcre.h", + "pcreposix.h" + ], + "libraries": [ + "libpcre.*", + "libpcre2*", + "libpcreposix.*" + ] + }, + { + "package": "php", + "headers": [ + "php" + ], + "libraries": [ + "php" + ] + }, + { + "package": "postgresql", + "libraries": [ + "libecpg*", + "libpg*", + "libpq*" + ] + }, + { + "package": "python", + "headers": [ + "python*" + ], + "frameworks": [ + "Python.framework" + ], + "libraries": [ + "libpython*", + "python*" + ] + }, + { + "package": "readline", + "headers": [ + "readline" + ], + "libraries": [ + "libhistory.*", + "libreadline.*" + ] + }, + { + "package": "ruby", + "frameworks": [ + "Ruby.framework" + ], + "libraries": [ + "libruby.*", + "ruby" + ] + }, + { + "package": "sqlite3", + "headers": [ + "sqlite3.h", + "sqlite3ext.h" + ], + "libraries": [ + "libsqlite3.*" + ] + }, + { + "package": "swift", + "libraries": [ + "swift/shims" + ] + }, + { + "package": "tcl", + "headers": [ + "tcl*", + "tk*" + ], + "frameworks": [ + "Tcl.framework", + "Tk.framework" + ], + "libraries": [ + "libtcl*", + "libtk*", + "tclConfig.sh", + "tkConfig.sh" + ] + }, + { + "package": "xar", + "headers": [ + "xar" + ], + "libraries": [ + "libxar.*" + ] + }, + { + "package": "xz", + "headers": [ + "lzma*" + ], + "libraries": [ + "liblzma.*" + ] + }, + { + "package": "zlib", + "headers": [ + "zconf.h", + "zlib.h" + ], + "libraries": [ + "libz.*" + ] + } +] diff --git a/pkgs/by-name/ap/apple-sdk/metadata/versions.json b/pkgs/by-name/ap/apple-sdk/metadata/versions.json new file mode 100644 index 0000000000000..39d0f1cf16a24 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/metadata/versions.json @@ -0,0 +1,42 @@ +{ + "10.12": { + "url": "http://swcdn.apple.com/content/downloads/22/62/041-88607/wg8avdk0jo75k9a13gentz9stwqgrqmcv6/CLTools_SDK_OSX1012.pkg", + "version": "10.12.2", + "hash": "sha256-Jf2WIB9bY/rPwe0AOW3YWJY/6EqVe41yhezdTGOO3M8=" + }, + "10.13": { + "url": "http://swcdn.apple.com/content/downloads/33/36/041-90419-A_7JJ4H9ZHO2/xs88ob5wjz6riz7g6764twblnvksusg4ps/CLTools_SDK_macOS1013.pkg", + "version": "10.13.2", + "hash": "sha256-8nd55fiJLfRWABAbMaHXjp6i20RqupmKedwmhb3S0/A=" + }, + "10.14": { + "url": "http://swcdn.apple.com/content/downloads/41/57/061-26573-A_JMOA8GZGDR/lj8yrtu8dgs40fw9k8f5fkoviwkp0og6vs/CLTools_SDK_macOS1014.pkg", + "version": "10.14.6", + "hash": "sha256-NMNkycIl3AVZCw0ZpHNkaeYVS9LAZVSddHw5loL9dhk=" + }, + "10.15": { + "url": "https://swcdn.apple.com/content/downloads/50/51/071-29699-A_YC8SX0OHH3/7479xojqghsvgtnt3dxjpnxuz9sjpmbmds/CLTools_macOSLMOS_SDK.pkg", + "version": "10.15.6", + "hash": "sha256-mPJQC+v4yNiOCKLQfhidB2WH2MMclSCP1odvOoGdVPw=" + }, + "11": { + "url": "https://swcdn.apple.com/content/downloads/02/62/071-54303-A_EU2CL1YVT7/943i95dpeyi2ghlnj2mgyq3t202t5gf18b/CLTools_macOSNMOS_SDK.pkg", + "version": "11.3", + "hash": "sha256-/go8utcx3jprf6c8V/DUbXwsmNYSFchOAai1OaJs3Bg=" + }, + "12": { + "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOSNMOS_SDK.pkg", + "version": "12.3", + "hash": "sha256-qG21ssNUmkqxPLTXALGP2N/RBHu8NMlI1dWvGlV+Wm8=" + }, + "13": { + "url": "https://swcdn.apple.com/content/downloads/15/62/032-84673-A_7A1TG1RF8Z/xpc8q44ggn2pkn82iwr0fi1zeb9cxi8ath/CLTools_macOSNMOS_SDK.pkg", + "version": "13.3", + "hash": "sha256-zZ4pbgoXunLGwdYDemxOfyH4CE5WGfMy2s5jN+0q4B4=" + }, + "14": { + "url": "https://swcdn.apple.com/content/downloads/14/48/052-59890-A_I0F5YGAY0Y/p9n40hio7892gou31o1v031ng6fnm9sb3c/CLTools_macOSNMOS_SDK.pkg", + "version": "14.4", + "hash": "sha256-QozDiwY0Czc0g45vPD7G4v4Ra+3DujCJbSads3fJjjM=" + } +} diff --git a/pkgs/by-name/ap/apple-sdk/package.nix b/pkgs/by-name/ap/apple-sdk/package.nix new file mode 100644 index 0000000000000..2fb57182001c3 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/package.nix @@ -0,0 +1,120 @@ +let + sdkVersions = builtins.fromJSON (builtins.readFile ./metadata/versions.json); +in + +{ + lib, + stdenv, + stdenvNoCC, + substitute, + + # Specifies the major version used for the SDK. Uses `hostPlatform.darwinSdkVersion` by default. + darwinSdkMajorVersion ? ( + if lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11" then + lib.versions.majorMinor stdenv.hostPlatform.darwinSdkVersion + else + lib.versions.major stdenv.hostPlatform.darwinSdkVersion + ), + # Enabling bootstrap disables propagation. Defaults to `false` (meaning to propagate certain packages and `xcrun`) + # except in stage0 of the Darwin stdenv bootstrap. + enableBootstrap ? stdenv.name == "bootstrap-stage0-stdenv-darwin", + + # Required by various phases + callPackage, + jq, +}: + +let + sdkInfo = + sdkVersions.${darwinSdkMajorVersion} + or (lib.throw "Unsupported SDK major version: ${darwinSdkMajorVersion}"); + sdkVersion = sdkInfo.version; + + fetchSDK = callPackage ./common/fetch-sdk.nix { }; + + phases = lib.composeManyExtensions ( + [ + (callPackage ./common/add-core-symbolication.nix { }) + (callPackage ./common/derivation-options.nix { }) + (callPackage ./common/passthru-private-frameworks.nix { inherit sdkVersion; }) + (callPackage ./common/passthru-source-release-files.nix { inherit sdkVersion; }) + (callPackage ./common/remove-disallowed-packages.nix { }) + ] + # Only process stubs and convert them to tbd-v4 if jq is available. This can be made unconditional once + # the bootstrap tools have jq and libtapi. + ++ lib.optional (jq != null) (callPackage ./common/process-stubs.nix { }) + # Avoid infinite recursions by not propagating certain packages, so they can themselves build with the SDK. + ++ lib.optionals (!enableBootstrap) [ + (callPackage ./common/propagate-inputs.nix { }) + (callPackage ./common/propagate-xcrun.nix { }) + ] + ++ [ + # These have to happen last. + (callPackage ./common/rewrite-sdk-paths.nix { inherit sdkVersion; }) + (callPackage ./common/run-build-phase-hooks.nix { }) + ] + ); +in +stdenvNoCC.mkDerivation ( + lib.extends phases (finalAttrs: { + pname = "apple-sdk"; + inherit (sdkInfo) version; + + src = fetchSDK sdkInfo; + + dontConfigure = true; + + strictDeps = true; + + setupHooks = [ + # `role.bash` is copied from `../build-support/setup-hooks/role.bash` due to the requirements not to reference + # paths outside the package when it is in `by-name`. It needs to be kept in sync, but it fortunately does not + # change often. Once `build-support` is available as a package (or some other mechanism), it should be changed + # to whatever that replacement is. + ./setup-hooks/role.bash + (substitute { + src = ./setup-hooks/sdk-hook.sh; + substitutions = [ + "--subst-var-by" + "sdkVersion" + (lib.escapeShellArgs (lib.splitVersion sdkVersion)) + ]; + }) + ]; + + installPhase = + let + sdkName = "MacOSX${lib.versions.majorMinor sdkVersion}.sdk"; + sdkMajor = lib.versions.major sdkVersion; + in + '' + runHook preInstall + + mkdir -p "$sdkpath" + + cp -rd . "$sdkpath/${sdkName}" + ${lib.optionalString (lib.versionAtLeast finalAttrs.version "11.0") '' + ln -s "${sdkName}" "$sdkpath/MacOSX${sdkMajor}.sdk" + ''} + ln -s "${sdkName}" "$sdkpath/MacOSX.sdk" + + runHook postInstall + ''; + + passthru = { + sdkroot = finalAttrs.finalPackage + "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"; + }; + + __structuredAttrs = true; + + meta = { + description = "Frameworks and libraries required for building packages on Darwin"; + homepage = "https://developer.apple.com"; + maintainers = lib.teams.darwin.members; + platforms = lib.platforms.darwin; + badPlatforms = + lib.optionals (lib.versionAtLeast sdkVersion "10.15") [ lib.systems.inspect.patterns.is32bit ] + ++ lib.optionals (lib.versionOlder sdkVersion "11.0") [ lib.systems.inspect.patterns.isAarch ]; + }; + }) +) diff --git a/pkgs/by-name/ap/apple-sdk/patches/0001-Add-function-definitions-needed-to-build-zlog-in-sys.patch b/pkgs/by-name/ap/apple-sdk/patches/0001-Add-function-definitions-needed-to-build-zlog-in-sys.patch new file mode 100644 index 0000000000000..681970cb2f71a --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/patches/0001-Add-function-definitions-needed-to-build-zlog-in-sys.patch @@ -0,0 +1,48 @@ +From 6531da946949a94643e6d8424236174ae64fe0ca Mon Sep 17 00:00:00 2001 +From: Randy Eckenrode +Date: Sat, 30 Sep 2023 18:02:39 -0400 +Subject: [PATCH 1/2] Add function definitions needed to build zlog in + system_cmds + +--- + CoreSymbolication.h | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/CoreSymbolication.h b/CoreSymbolication.h +index a413860..f3cf63f 100644 +--- a/CoreSymbolication.h ++++ b/CoreSymbolication.h +@@ -324,7 +324,9 @@ CSSymbolOwnerEditRelocations + CSSymbolOwnerForeachRegion + CSSymbolOwnerForeachRegionWithName + CSSymbolOwnerForeachSection +-CSSymbolOwnerForeachSegment ++*/ ++void CSSymbolOwnerForeachSegment(CSSymbolOwnerRef owner, void (^block)(CSSegmentRef)); ++/* + CSSymbolOwnerForeachSourceInfo + CSSymbolOwnerForeachSymbol + */ +@@ -333,7 +335,9 @@ void CSSymbolOwnerForeachSymbolWithName(CSSymbolOwnerRef owner, const char *sna + /* + CSSymbolOwnerGetArchitecture + CSSymbolOwnerGetBaseAddress +-CSSymbolOwnerGetCFUUIDBytes ++*/ ++const CFUUIDBytes* CSSymbolOwnerGetCFUUIDBytes(CSSymbolOwnerRef owner); ++/* + CSSymbolOwnerGetCompatibilityVersion + CSSymbolOwnerGetCurrentVersion + CSSymbolOwnerGetDataFlags +@@ -390,7 +394,7 @@ CSSymbolOwnerSetLoadTimestamp + CSSymbolOwnerSetPath + CSSymbolOwnerSetRelocationCount + */ +-CSSymbolOwnerSetTransientUserData(CSSymbolOwnerRef owner, uint32_t gen); ++void CSSymbolOwnerSetTransientUserData(CSSymbolOwnerRef owner, uint32_t gen); + /* + CSSymbolOwnerSetUnloadTimestamp + */ +-- +2.44.1 + diff --git a/pkgs/by-name/ap/apple-sdk/patches/0002-Add-CF_EXPORT-To-const-symbols.patch b/pkgs/by-name/ap/apple-sdk/patches/0002-Add-CF_EXPORT-To-const-symbols.patch new file mode 100644 index 0000000000000..01f934be6ef4f --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/patches/0002-Add-CF_EXPORT-To-const-symbols.patch @@ -0,0 +1,45 @@ +From ae7ac6a7043dbae8e63d6ce5e63dfaf02b5977fe Mon Sep 17 00:00:00 2001 +From: Randy Eckenrode +Date: Sat, 30 Sep 2023 18:37:18 -0400 +Subject: [PATCH 2/2] Add CF_EXPORT To const symbols + +--- + CoreSymbolication.h | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/CoreSymbolication.h b/CoreSymbolication.h +index f3cf63f..4124a54 100644 +--- a/CoreSymbolication.h ++++ b/CoreSymbolication.h +@@ -49,6 +49,7 @@ + + + #include ++#include + #include + + +@@ -139,13 +140,13 @@ typedef void (^CSSegmentIterator)(CSSegmentRef segment); + * External symbols + */ + +-const char* kCSRegionMachHeaderName; +-const CSDictionaryKeyCallBacks kCSTypeDictionaryKeyCallBacks; +-const CSDictionaryValueCallBacks kCSTypeDictionaryValueCallBacks; +-const CSDictionaryKeyCallBacks kCSTypeDictionaryWeakKeyCallBacks; +-const CSDictionaryValueCallBacks kCSTypeDictionaryWeakValueCallBacks; +-const CSSetCallBacks kCSTypeSetCallBacks; +-const CSSetCallBacks kCSTypeSetWeakCallBacks; ++CF_EXPORT const char* kCSRegionMachHeaderName; ++CF_EXPORT const CSDictionaryKeyCallBacks kCSTypeDictionaryKeyCallBacks; ++CF_EXPORT const CSDictionaryValueCallBacks kCSTypeDictionaryValueCallBacks; ++CF_EXPORT const CSDictionaryKeyCallBacks kCSTypeDictionaryWeakKeyCallBacks; ++CF_EXPORT const CSDictionaryValueCallBacks kCSTypeDictionaryWeakValueCallBacks; ++CF_EXPORT const CSSetCallBacks kCSTypeSetCallBacks; ++CF_EXPORT const CSSetCallBacks kCSTypeSetWeakCallBacks; + + + /* +-- +2.44.1 + diff --git a/pkgs/by-name/ap/apple-sdk/scripts/get-sdks-from-catalog.sh b/pkgs/by-name/ap/apple-sdk/scripts/get-sdks-from-catalog.sh new file mode 100755 index 0000000000000..1293fab11cc92 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/scripts/get-sdks-from-catalog.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p coreutils curl file gzip jq xcbuild yq + +set -eu -o pipefail + +catalog=${1-} + +if [ -z "$catalog" ]; then + echo "usage: get-sdks-from-catalog.sh " + echo " Apple software update catalog (may be gzipped)" >&2 + exit 1 +fi + +scratch=$(mktemp) +trap 'rm -f -- "$scratch"' EXIT + +if [[ "$(file "$catalog")" =~ gzip ]]; then + gzcat "$catalog" > "$scratch" +else + cp --reflink=auto "$catalog" "$scratch" +fi + +# Grab all SDK packages from the catalog +filter='.Products[].Packages[] | select(.URL | test(".*CLTools_macOSNMOS_SDK.pkg")) | "\(.URL)|\(.MetadataURL)"' + +declare -A package_list +for package in $(plutil -convert json -o - "$scratch" | jq -r "$filter"); do + package_list[${package%%|*}]=${package#*|} +done + +truncate --size 0 "$scratch" +for pkg in "${!package_list[@]}"; do + ver=$(curl --silent "${package_list[$pkg]}" | xq -r '."pkg-info"."@version"') + echo "{\"url\": \"$pkg\", \"version\": \"$(cut -d. -f1-3 <<< "$ver")\", \"long_version\": \"$ver\"}" >> "$scratch" +done + +jq -r --slurp ' + group_by(.version | split(".")[0]) + | map(max_by(.version)) + | sort_by(.version)[] + | "Package URL: \(.url)\n Xcode Ver: \(.version) (\(.long_version))\n"' "$scratch" diff --git a/pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh b/pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh new file mode 100755 index 0000000000000..ce2c1f1aeb534 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/scripts/lock-sdk-deps.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p coreutils curl git gnutar jq moreutils nix + +set -eu -o pipefail + +if [ ! -v 2 ]; then + echo "usage: lock-sdk-deps.sh " >&2 + echo " Decimal-separated version number." >&2 + echo " Must correspond to a tag in https://github.com/apple-oss-distributions/distribution-macOS" >&2 + echo " List of packages from the distributions-macOS repository." >&2 + echo " Packages not in the repository at the tag for will be ignored." + exit 1 +fi + +pkgdir=$(dirname "$(dirname "$(realpath "$0")")") + +lockfile=$pkgdir/metadata/apple-oss-lockfile.json +if [ ! -e "$lockfile" ]; then + touch "$lockfile" +fi + +workdir=$(mktemp -d) +trap 'rm -rf -- "$workdir"' EXIT + +sdkVersion=$1; shift +tag="macos-${sdkVersion//.}" + +declare -a packages=("$@") + +echo "Locking versions for macOS $sdkVersion using tag '$tag'..." + +pushd "$workdir" > /dev/null + +git clone --branch "$tag" https://github.com/apple-oss-distributions/distribution-macOS.git &> /dev/null +cd distribution-macOS + +for package in "${packages[@]}"; do + # If the tag exists in `release.json`, use that as an optimization to avoid downloading unnecessarily from Github. + packageTag=$(jq -r --arg package "$package" '.projects[] | select(.project == $package) | .tag' release.json) + packageCommit=$(git ls-tree -d HEAD "$package" | awk '{print $3}') + + if [ ! -d "$package" ]; then + packageCommit=HEAD + fi + + # However, sometimes it doesn’t exist. In that case, fall back to cloning the repo and check manually + # which tag corresponds to the commit from the submodule. + if [ -z "$packageTag" ]; then + git clone --no-checkout "https://github.com/apple-oss-distributions/$package.git" ../source &> /dev/null + pushd ../source > /dev/null + packageTag=$(git tag --points-at "$packageCommit") + popd > /dev/null + rm -rf ../source + fi + + packageVersion=${packageTag##"$package"-} + + curl -OL "https://github.com/apple-oss-distributions/$package/archive/$packageTag.tar.gz" &> /dev/null + tar axf "$packageTag.tar.gz" + + packageHash=$(nix --extra-experimental-features nix-command hash path "$package-$packageTag") + + pkgsjson="{\"$package\": {\"version\": \"$packageVersion\", \"hash\": \"$packageHash\"}}" + + echo " - Locking $package to version $packageVersion with hash '$packageHash'" + jq --argjson pkg "$pkgsjson" -S '. * $pkg' "$lockfile" | sponge "$lockfile" +done + +popd > /dev/null diff --git a/pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh b/pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh new file mode 100755 index 0000000000000..3922916e6135d --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/scripts/regenerate-lockfile.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p coreutils jq + +set -eu -o pipefail + +pkgdir=$(dirname "$(dirname "$(realpath "$0")")") + +echo '{}' > "$pkgdir/metadata/apple-oss-lockfile.json" + +declare -a versions +readarray -t versions < <(jq -r '.[].version' "$pkgdir/metadata/versions.json") + +declare -a packages=( + CarbonHeaders + CommonCrypto + IOAudioFamily + IOFireWireFamily + IOFWDVComponents + IOFireWireAVC + IOFireWireSBP2 + IOFireWireSerialBusProtocolTransport + IOGraphics + IOHIDFamily + IONetworkingFamily + IOSerialFamily + IOStorageFamily + IOBDStorageFamily + IOCDStorageFamily + IODVDStorageFamily + IOUSBFamily + IOKitUser + Libc + Libinfo + Libm + Libnotify + Librpcsvc + Libsystem + OpenDirectory + Security + architecture + configd + copyfile + dtrace + dyld + eap8021x + hfs + launchd + libclosure + libdispatch + libmalloc + libplatform + libpthread + mDNSResponder + objc4 + ppp + removefile + xnu +) + +for version in "${versions[@]}"; do + "$pkgdir/scripts/lock-sdk-deps.sh" "$version" "${packages[@]}" +done diff --git a/pkgs/by-name/ap/apple-sdk/setup-hooks/add-private-frameworks.sh b/pkgs/by-name/ap/apple-sdk/setup-hooks/add-private-frameworks.sh new file mode 100644 index 0000000000000..d5c48e3dd8799 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/setup-hooks/add-private-frameworks.sh @@ -0,0 +1,6 @@ +function enablePrivateFrameworks() { + export NIX_CFLAGS_COMPILE+=" -iframework $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/PrivateFrameworks" + export NIX_LDFLAGS+=" -F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/PrivateFrameworks" +} + +preConfigureHooks+=(enablePrivateFrameworks) diff --git a/pkgs/by-name/ap/apple-sdk/setup-hooks/role.bash b/pkgs/by-name/ap/apple-sdk/setup-hooks/role.bash new file mode 100644 index 0000000000000..bfd6b61f0aed6 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/setup-hooks/role.bash @@ -0,0 +1,71 @@ +# Since the same derivation can be depended on in multiple ways, we need to +# accumulate *each* role (i.e. host and target platforms relative the depending +# derivation) in which the derivation is used. +# +# The role is intended to be used as part of other variables names like +# - $NIX_SOMETHING${role_post} + +function getRole() { + case $1 in + -1) + role_post='_FOR_BUILD' + ;; + 0) + role_post='' + ;; + 1) + role_post='_FOR_TARGET' + ;; + *) + echo "@name@: used as improper sort of dependency" >&2 + return 1 + ;; + esac +} + +# `hostOffset` describes how the host platform of the package is slid relative +# to the depending package. `targetOffset` likewise describes the target +# platform of the package. Both are brought into scope of the setup hook defined +# for dependency whose setup hook is being processed relative to the package +# being built. + +function getHostRole() { + getRole "$hostOffset" +} +function getTargetRole() { + getRole "$targetOffset" +} + +# `depHostOffset` describes how the host platform of the dependencies are slid +# relative to the depending package. `depTargetOffset` likewise describes the +# target platform of dependenices. Both are brought into scope of the +# environment hook defined for the dependency being applied relative to the +# package being built. + +function getHostRoleEnvHook() { + getRole "$depHostOffset" +} +function getTargetRoleEnvHook() { + getRole "$depTargetOffset" +} + +# This variant is intended specifically for code-producing tool wrapper scripts +# `NIX_@wrapperName@_TARGET_*_@suffixSalt@` tracks this (needs to be an exported +# env var so can't use fancier data structures). +function getTargetRoleWrapper() { + case $targetOffset in + -1) + export NIX_@wrapperName@_TARGET_BUILD_@suffixSalt@=1 + ;; + 0) + export NIX_@wrapperName@_TARGET_HOST_@suffixSalt@=1 + ;; + 1) + export NIX_@wrapperName@_TARGET_TARGET_@suffixSalt@=1 + ;; + *) + echo "@name@: used as improper sort of dependency" >&2 + return 1 + ;; + esac +} diff --git a/pkgs/by-name/ap/apple-sdk/setup-hooks/sdk-hook.sh b/pkgs/by-name/ap/apple-sdk/setup-hooks/sdk-hook.sh new file mode 100644 index 0000000000000..62fa8b339a711 --- /dev/null +++ b/pkgs/by-name/ap/apple-sdk/setup-hooks/sdk-hook.sh @@ -0,0 +1,17 @@ +local role_post +getHostRole + +local sdkVersionVar=NIX_APPLE_SDK_VERSION${role_post} +local developerDirVar=DEVELOPER_DIR${role_post} + +local sdkVersionArr=(@sdkVersion@) +local sdkVersion +sdkVersion=$(printf "%02d%02d%02d" "${sdkVersionArr[0]-0}" "${sdkVersionArr[1]-0}" "${sdkVersionArr[2]-0}") + +if [ "$sdkVersion" -gt "${!sdkVersionVar-000000}" ]; then + export "$developerDirVar"='@out@' + export "$sdkVersionVar"="$sdkVersion" + export "SDKROOT${role_post}"="${!developerDirVar}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" +fi + +unset -v role_post developerDirVar sdkVersion sdkVersionArr sdkVersionVar diff --git a/pkgs/by-name/cc/cctools/package.nix b/pkgs/by-name/cc/cctools/package.nix index c56f79b69e474..56eb8b158be8a 100644 --- a/pkgs/by-name/cc/cctools/package.nix +++ b/pkgs/by-name/cc/cctools/package.nix @@ -3,7 +3,6 @@ stdenv, fetchFromGitHub, buildPackages, - darwin, ld64, llvm, memstreamHook, @@ -38,6 +37,7 @@ stdenv.mkDerivation (finalAttrs: { "dev" "man" "gas" + "libtool" ]; src = fetchFromGitHub { @@ -127,13 +127,10 @@ stdenv.mkDerivation (finalAttrs: { openssl ]; - buildInputs = - [ - ld64 - llvm - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.objc4 ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; + buildInputs = [ + ld64 + llvm + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; mesonBuildType = "release"; @@ -153,6 +150,10 @@ stdenv.mkDerivation (finalAttrs: { for arch in arm i386 x86_64; do mv "$gas/libexec/as/$arch/as-$arch" "$gas/libexec/as/$arch/as" done + + # Move libtool to its own output to allow packages to add it without pulling in all of cctools + moveToOutput bin/${targetPrefix}libtool "$libtool" + ln -s "$libtool/bin/${targetPrefix}libtool" "$out/bin/${targetPrefix}libtool" ''; __structuredAttrs = true; diff --git a/pkgs/by-name/cm/cmake/package.nix b/pkgs/by-name/cm/cmake/package.nix index 985b07cfb8a62..4ccac77995412 100644 --- a/pkgs/by-name/cm/cmake/package.nix +++ b/pkgs/by-name/cm/cmake/package.nix @@ -181,6 +181,14 @@ stdenv.mkDerivation (finalAttrs: { sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile ''; + # Undo some of `fixCmakeFiles` for Darwin to make sure that checks for libraries in the SDK find them + # (e.g., `find_library(MATH_LIBRARY m)` should find `$SDKROOT/usr/lib/libm.tbd`). + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace "$out/share/cmake-${lib.versions.majorMinor finalAttrs.version}/Modules/Platform/Darwin.cmake" \ + --replace-fail '/var/empty/include' '/usr/include' \ + --replace-fail '/var/empty/lib' '/usr/lib' + ''; + dontUseCmakeConfigure = true; enableParallelBuilding = true; diff --git a/pkgs/by-name/cm/cmake/setup-hook.sh b/pkgs/by-name/cm/cmake/setup-hook.sh index 0bb0426bca824..3df8b9bd986b0 100755 --- a/pkgs/by-name/cm/cmake/setup-hook.sh +++ b/pkgs/by-name/cm/cmake/setup-hook.sh @@ -57,9 +57,6 @@ cmakeConfigurePhase() { # because we usually do not package the framework prependToVar cmakeFlags "-DCMAKE_FIND_FRAMEWORK=LAST" - # we never want to use the global macOS SDK - prependToVar cmakeFlags "-DCMAKE_OSX_SYSROOT=" - # correctly detect our clang compiler prependToVar cmakeFlags "-DCMAKE_POLICY_DEFAULT_CMP0025=NEW" diff --git a/pkgs/by-name/ld/ld64/meson.build b/pkgs/by-name/ld/ld64/meson.build index 0de64797c4aac..84468e6f99381 100644 --- a/pkgs/by-name/ld/ld64/meson.build +++ b/pkgs/by-name/ld/ld64/meson.build @@ -90,7 +90,6 @@ configure_h = custom_target( incdirs = include_directories( 'compat', - 'include', 'src/abstraction', 'src/ld', 'src/ld/code-sign-blobs', diff --git a/pkgs/by-name/ld/ld64/package.nix b/pkgs/by-name/ld/ld64/package.nix index 1ca2291506325..b5900f3576acf 100644 --- a/pkgs/by-name/ld/ld64/package.nix +++ b/pkgs/by-name/ld/ld64/package.nix @@ -1,11 +1,13 @@ { lib, stdenv, + stdenvNoCC, fetchFromGitHub, fetchurl, + apple-sdk, + cctools, darwin, libtapi, - libunwind, llvm, meson, ninja, @@ -30,16 +32,53 @@ let hash = "sha256-0ybVcwHuGEdThv0PPjYQc3SW0YVOyrM3/L9zG/l1Vtk="; }; + dyld = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "dyld"; + rev = "dyld-1162"; + hash = "sha256-uyFg8QnnP6NWv5lAOTCiFZ0SnFOA/aO/kpjkyvILVsk="; + }; + + libdispatchPrivate = apple-sdk.sourceRelease "libdispatch"; + # First version with all the required definitions. This is used in preference to darwin.xnu to make it easier # to support Linux and because the version of darwin.xnu available on x86_64-darwin in the 10.12 SDK is too old. xnu = fetchFromGitHub { - name = "xnu-src"; owner = "apple-oss-distributions"; repo = "xnu"; rev = "xnu-6153.11.26"; hash = "sha256-dcnGcp7bIjQxeAn5pXt+mHSYEXb2Ad9Smhd/WUG4kb4="; }; + privateHeaders = stdenvNoCC.mkDerivation { + name = "ld64-deps-private-headers"; + + buildCommand = '' + mkdir -p "$out/include/System" + for dir in arm i386 machine; do + cp -r '${xnu}/osfmk/'$dir "$out/include/System/$dir" + done + + substitute '${crashreporter_h}' "$out/include/CrashReporterClient.h" \ + --replace-fail 'USE(APPLE_INTERNAL_SDK)' '0' + + cp -r '${libdispatchPrivate}/private' "$out/include/dispatch" + + install -D -t "$out/include/mach-o" \ + '${dyld}/include/mach-o/dyld_priv.h' \ + '${cctools.src}/include/mach-o/loader.h' + + install -D -t "$out/include/mach-o/arm" \ + '${cctools.src}/include/mach-o/arm/reloc.h' + + install -D -t "$out/include/sys" \ + '${xnu}/bsd/sys/commpage.h' + + substituteInPlace "$out/include/mach-o/dyld_priv.h" \ + --replace-fail ', bridgeos(3.0)' "" + ''; + }; + # Avoid pulling in all of Swift just to build libdispatch libdispatch = swiftPackages.Dispatch.override { useSwift = false; }; in @@ -63,8 +102,6 @@ stdenv.mkDerivation (finalAttrs: { xcodeHash = "sha256-+j7Ed/6aD46SJnr3DWPfWuYWylb2FNJRPmWsUVxZJHM="; postUnpack = '' - unpackFile '${xnu}' - # Verify that the Xcode project has not changed unexpectedly. hashType=$(echo $xcodeHash | cut -d- -f1) expectedHash=$(echo $xcodeHash | cut -d- -f2) @@ -100,19 +137,6 @@ stdenv.mkDerivation (finalAttrs: { --subst-var version cp ${./meson.options} meson.options - # Copy headers for certain private APIs - mkdir -p include - substitute ${crashreporter_h} include/CrashReporterClient.h \ - --replace-fail 'USE(APPLE_INTERNAL_SDK)' '0' - - # Copy from the source so the headers can be used on Linux and x86_64-darwin - mkdir -p include/System - for dir in arm i386 machine; do - cp -r ../xnu-src/osfmk/$dir include/System/$dir - done - mkdir -p include/sys - cp ../xnu-src/bsd/sys/commpage.h include/sys - # Match the version format used by upstream. sed -i src/ld/Options.cpp \ -e '1iconst char ld_classicVersionString[] = "@(#)PROGRAM:ld PROJECT:ld64-${finalAttrs.version}\\n";' @@ -134,6 +158,8 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; + env.NIX_CFLAGS_COMPILE = "-DTARGET_OS_BRIDGE=0 -I${privateHeaders}/include"; + nativeBuildInputs = [ meson ninja @@ -146,7 +172,6 @@ stdenv.mkDerivation (finalAttrs: { [ libtapi llvm - libunwind openssl xar ] @@ -173,6 +198,7 @@ stdenv.mkDerivation (finalAttrs: { cd "$NIX_BUILD_TOP/$sourceRoot" export NIX_CFLAGS_COMPILE+=" --ld-path=$out/bin/${targetPrefix}ld" + export NIX_CFLAGS_LINK+=" -L$SDKROOT/usr/lib" meson setup build-install-check -Db_lto=true --buildtype=$mesonBuildType${ lib.optionalString (targetPrefix != "") " -Dtarget_prefix=${targetPrefix}" } diff --git a/pkgs/by-name/li/libiconv-darwin/package.nix b/pkgs/by-name/li/libiconv-darwin/package.nix deleted file mode 100644 index e928cd999165f..0000000000000 --- a/pkgs/by-name/li/libiconv-darwin/package.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - atf, - gperf, - libiconvReal, - meson, - ninja, - pkg-config, - gitUpdater, -}: - -let - inherit (stdenv) hostPlatform; -in -stdenv.mkDerivation (finalAttrs: { - pname = "libiconv"; - version = "99"; - - outputs = [ - "out" - "dev" - ]; - - # Propagate `out` only when there are dylibs to link (i.e., don’t propagate when doing a static build). - propagatedBuildOutputs = lib.optionalString (!hostPlatform.isStatic) "out"; - - src = fetchFromGitHub { - owner = "apple-oss-distributions"; - repo = "libiconv"; - rev = "libiconv-${finalAttrs.version}"; - hash = "sha256-TGt6rsU52ztfW2rCqwnhMAExLbexI/59IoDOGY+XGu0="; - }; - - setupHooks = - libiconvReal.setupHooks - ++ lib.optionals hostPlatform.isStatic [ ./static-setup-hook.sh ]; - - patches = lib.optionals hostPlatform.isStatic [ ./0001-Support-static-module-loading.patch ] ++ [ - ./0002-Fix-ISO-2022-out-of-bounds-write-with-encoded-charac.patch - ]; - - postPatch = - '' - substitute ${./meson.build} meson.build --subst-var version - cp ${./meson.options} meson.options - - # Work around unnecessary private API usage in libcharset - mkdir -p libcharset/os && cat <<-header > libcharset/os/variant_private.h - #pragma once - #include - static inline bool os_variant_has_internal_content(const char*) { return false; } - header - - cp ${./nixpkgs_test.c} tests/libiconv/nixpkgs_test.c - '' - + lib.optionalString hostPlatform.isStatic '' - cp ${./static-modules.gperf} static-modules.gperf - ''; - - strictDeps = true; - - nativeBuildInputs = - [ - meson - ninja - ] - # Dynamic builds use `dlopen` to load modules, but static builds have to link them all. - # `gperf` is used to generate a lookup table from module to ops functions. - ++ lib.optionals hostPlatform.isStatic [ gperf ]; - - mesonBuildType = "release"; - - mesonFlags = [ (lib.mesonBool "tests" finalAttrs.doInstallCheck) ]; - - postInstall = - lib.optionalString (stdenv.hostPlatform.isDarwin && !hostPlatform.isStatic) '' - ${stdenv.cc.targetPrefix}install_name_tool "$out/lib/libiconv.2.dylib" \ - -change '@rpath/libcharset.1.dylib' "$out/lib/libcharset.1.dylib" - '' - # Move the static library to the `dev` output - + lib.optionalString hostPlatform.isStatic '' - moveToOutput lib "$dev" - ''; - - # Tests have to be run in `installCheckPhase` because libiconv expects to `dlopen` - # modules from `$out/lib/i18n`. - nativeInstallCheckInputs = [ pkg-config ]; - installCheckInputs = [ atf ]; - - doInstallCheck = stdenv.buildPlatform.canExecute hostPlatform; - - # Can’t use `mesonCheckPhase` because it runs the wrong hooks for `installCheckPhase`. - installCheckPhase = '' - runHook preInstallCheck - meson test --no-rebuild - runHook postInstallCheck - ''; - - passthru.updateScript = gitUpdater { rev-prefix = "libiconv-"; }; - - __structuredAttrs = true; - - meta = { - description = "Iconv(3) implementation"; - homepage = "https://opensource.apple.com/releases/"; - license = - with lib.licenses; - [ - bsd2 - bsd3 - ] - ++ lib.optional finalAttrs.doInstallCheck apsl10; - mainProgram = "iconv"; - maintainers = with lib.maintainers; [ reckenrode ]; - platforms = lib.platforms.darwin; - }; -}) diff --git a/pkgs/by-name/li/libxo/package.nix b/pkgs/by-name/li/libxo/package.nix new file mode 100644 index 0000000000000..8e20b8edc7b1a --- /dev/null +++ b/pkgs/by-name/li/libxo/package.nix @@ -0,0 +1,70 @@ +{ + lib, + autoreconfHook, + bash, + libtool, + fetchFromGitHub, + nix-update-script, + perl, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libxo"; + version = "1.7.5"; + + src = fetchFromGitHub { + owner = "Juniper"; + repo = "libxo"; + rev = finalAttrs.version; + hash = "sha256-ElSxegY2ejw7IuIMznfVpl29Wyvpx9k1BdXregzYsoQ="; + }; + + postPatch = '' + substituteInPlace configure.ac \ + --replace-fail LIBTOOL=glibtool 'LIBTOOL=${lib.getExe libtool}' + + # Remove impurities + substituteInPlace libxo/Makefile.am \ + --replace-fail '-L/opt/local/lib' "" + ''; + + outputs = [ + "bin" + "out" + "dev" + "man" + ]; + + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ + # libxo misdetects malloc and realloc when cross-compiling on Darwin + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes" + ]; + + strictDeps = true; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ + autoreconfHook + # For patchShebangs in postInstall + bash + perl + ]; + + postInstall = '' + moveToOutput "bin/libxo-config" "$dev" + patchShebangs --host "$out/bin" + ''; + + __structuredAttrs = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Library to generate text, XML, JSON, and HTML"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.reckenrode ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/xa/xar/package.nix b/pkgs/by-name/xa/xar/package.nix index 4ad071f36a1f0..3b4aafa43b200 100644 --- a/pkgs/by-name/xa/xar/package.nix +++ b/pkgs/by-name/xa/xar/package.nix @@ -30,14 +30,14 @@ xar, }: stdenv.mkDerivation (finalAttrs: { - pname = "xar"; - version = "498"; + pname = "xar${lib.optionalString (e2fsprogs == null) "-minimal"}"; + version = "501"; src = fetchFromGitHub { owner = "apple-oss-distributions"; repo = "xar"; rev = "xar-${finalAttrs.version}"; - hash = "sha256-RyWeR/ZnDBHIZhwzVxETdrTTPQA2VgsLZegRkxX1240="; + hash = "sha256-Fq+Re0LCBIGhW2FR+pgV8SWtaDOEFgTh+rQ8JFWK/k0="; }; # Update patch set with diff --git a/pkgs/by-name/xc/xcbuild/package.nix b/pkgs/by-name/xc/xcbuild/package.nix new file mode 100644 index 0000000000000..7b574aa919949 --- /dev/null +++ b/pkgs/by-name/xc/xcbuild/package.nix @@ -0,0 +1,161 @@ +{ + lib, + cmake, + darwin, + fetchFromGitHub, + libpng, + libxml2, + makeBinaryWrapper, + ninja, + stdenv, + zlib, + + # These arguments are obsolete but required to avoid evaluation errors (for now). + CoreGraphics ? null, + CoreServices ? null, + ImageIO ? null, + + # These are deprecated and do nothing. They’re needed for compatibility and will + # warn eventually once in-tree uses are cleaned up. + xcodePlatform ? null, + xcodeVer ? null, + sdkVer ? null, + productBuildVer ? null, +}: + +# TODO(@reckenrode) enable this warning after uses in nixpkgs have been fixed +#let +# attrs = { +# inherit +# xcodePlatform +# xcodeVer +# sdkVer +# productBuildVer +# ; +# }; +#in +#assert lib.warnIf (lib.any (attr: attr != null) (lib.attrValues attrs)) '' +# The following arguments are deprecated and do nothing: ${ +# lib.concatStringsSep ", " (lib.attrNames (lib.filterAttrs (_: value: value != null) attrs)) +# } +# +# xcbuild will dynamically pick up the SDK and SDK version based +# on the SDK used in nixpkgs. If you need to use a different SDK, +# add the appropriate SDK to your package’s `buildInputs`. +# +# See the stdenv documentation for how to use `apple-sdk`. +#'' true; + +let + googletest = fetchFromGitHub { + owner = "google"; + repo = "googletest"; + rev = "43359642a1c16ad3f4fc575c7edd0cb935810815"; + sha256 = "sha256-mKjXaawFHSRrbJBtADJ1Pdk6vtuD+ax0HFk6YaBSnXg="; + }; + + linenoise = fetchFromGitHub { + owner = "antirez"; + repo = "linenoise"; + rev = "c894b9e59f02203dbe4e2be657572cf88c4230c3"; + sha256 = "sha256-nKxwWuSqr89lvI9Y3QAW5Mo7/iFfMNj/OOQVeA/FWnE="; + }; +in +stdenv.mkDerivation (finalAttrs: { + pname = "xcbuild"; + + outputs = [ + "out" + "xcrun" + ]; + + version = "0.1.1-unstable-2019-11-20"; + src = fetchFromGitHub { + owner = "facebook"; + repo = "xcbuild"; + rev = "dbaee552d2f13640773eb1ad3c79c0d2aca7229c"; + hash = "sha256-7mvSuRCWU/LlIBdmnC59F4SSzJPEcQhlmEK13PNe1xc="; + }; + + patches = [ + # Add missing header for `abort` + ./patches/includes.patch + # Prevent xcrun from recursively invoking itself + ./patches/Avoid-fork-bomb-when-searching-system-paths.patch + ]; + + prePatch = '' + rmdir ThirdParty/* + cp -r --no-preserve=all ${googletest} ThirdParty/googletest + cp -r --no-preserve=all ${linenoise} ThirdParty/linenoise + ''; + + postPatch = + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + # Fix build on gcc-13 due to missing includes + sed -e '1i #include ' -i \ + Libraries/libutil/Headers/libutil/Permissions.h \ + Libraries/pbxbuild/Headers/pbxbuild/Tool/AuxiliaryFile.h \ + Libraries/pbxbuild/Headers/pbxbuild/Tool/Invocation.h + + # Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror. + sed 1i'#include ' \ + -i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # Apple Open Sourced LZFSE, but not libcompression, and it isn't + # part of an impure framework we can add + substituteInPlace Libraries/libcar/Sources/Rendition.cpp \ + --replace "#if HAVE_LIBCOMPRESSION" "#if 0" + ''; + + strictDeps = true; + + env.NIX_CFLAGS_COMPILE = "-Wno-error"; + + nativeBuildInputs = [ + cmake + makeBinaryWrapper + ninja + ]; + + buildInputs = [ + libpng + libxml2 + zlib + ]; + + # TODO: instruct cmake not to put it in /usr, rather than cleaning up + postInstall = '' + mv $out/usr/* $out + rmdir $out/usr + cp liblinenoise.* $out/lib/ + + mkdir -p "$xcrun/bin" + ln -s "$out/bin/xcrun" "$xcrun/bin/xcrun" + + # xcbuild and xcrun support absolute paths, but they can’t find the SDK with the way it’s set up in + # the store. Fortunately, the combination of `DEVELOPER_DIR` and a plain `SDKROOT` is enough. + wrapProgram "$out/bin/xcbuild" --set SDKROOT macosx + wrapProgram "$out/bin/xcrun" --set SDKROOT macosx + ''; + + __structuredAttrs = true; + + passthru = { + xcbuild = + # lib.warn "xcbuild.xcbuild is deprecated and will be removed; use xcbuild instead." + finalAttrs.finalPackage; + }; + + meta = { + description = "Xcode-compatible build tool"; + homepage = "https://github.com/facebook/xcbuild"; + license = with lib.licenses; [ + bsd2 + bsd3 + ]; + maintainers = lib.teams.darwin.members; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch b/pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch new file mode 100644 index 0000000000000..bad8621e4b8cb --- /dev/null +++ b/pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch @@ -0,0 +1,47 @@ +diff --git a/Libraries/xcsdk/Tools/xcrun.cpp b/Libraries/xcsdk/Tools/xcrun.cpp +index 9d6d4576d7..7400267c2b 100644 +--- a/Libraries/xcsdk/Tools/xcrun.cpp ++++ b/Libraries/xcsdk/Tools/xcrun.cpp +@@ -23,6 +23,8 @@ + #include + #include + ++#include ++ + using libutil::DefaultFilesystem; + using libutil::Filesystem; + using libutil::FSUtil; +@@ -398,6 +400,8 @@ + fprintf(stderr, "\n"); + } + ++ std::unordered_map environment = processContext->environmentVariables(); ++ + /* + * Collect search paths for the tool. + * Can be in toolchains, target (if one is provided), developer root, +@@ -408,6 +412,15 @@ + executablePaths.insert(executablePaths.end(), defaultExecutablePaths.begin(), defaultExecutablePaths.end()); + + /* ++ * Don’t look for tools in `/usr/bin` because it can cause an infinite recursion when `xcrun` finds a shim ++ * that tries to invoke `xcrun` to run the tool. ++ */ ++ executablePaths.erase( ++ std::remove(executablePaths.begin(), executablePaths.end(), "/usr/bin"), ++ executablePaths.end() ++ ); ++ ++ /* + * Find the tool to execute. + */ + ext::optional executable = filesystem->findExecutable(*options.tool(), executablePaths); +@@ -428,8 +441,6 @@ + } else { + /* Run is the default. */ + +- std::unordered_map environment = processContext->environmentVariables(); +- + if (target != nullptr) { + /* + * Update effective environment to include the target path. diff --git a/pkgs/development/tools/xcbuild/includes.patch b/pkgs/by-name/xc/xcbuild/patches/includes.patch similarity index 100% rename from pkgs/development/tools/xcbuild/includes.patch rename to pkgs/by-name/xc/xcbuild/patches/includes.patch diff --git a/pkgs/development/tools/xcbuild/setup-hook.sh b/pkgs/by-name/xc/xcbuild/setup-hook.sh similarity index 100% rename from pkgs/development/tools/xcbuild/setup-hook.sh rename to pkgs/by-name/xc/xcbuild/setup-hook.sh diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index a6d727739d271..ad8d837b77ac3 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -7,10 +7,11 @@ , src ? null , monorepoSrc ? null , runCommand +, apple-sdk +, apple-sdk_10_13 , cmake , ninja , python3 -, xcbuild , libllvm , libcxx , linuxHeaders @@ -46,6 +47,14 @@ let baseName = "compiler-rt"; pname = baseName + lib.optionalString (haveLibc) "-libc"; + # Sanitizers require 10.13 or newer. Instead of disabling them for most x86_64-darwin users, + # build them with a newer SDK and the default (10.12) deployment target. + apple-sdk' = + if lib.versionOlder (lib.getVersion apple-sdk) "10.13" then + apple-sdk_10_13.override { enableBootstrap = true; } + else + apple-sdk.override { enableBootstrap = true; }; + src' = if monorepoSrc != null then runCommand "${baseName}-src-${version}" {} '' mkdir -p "$out" @@ -67,22 +76,29 @@ stdenv.mkDerivation ({ nativeBuildInputs = [ cmake ] ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) - ++ [ python3 libllvm.dev ] - ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun; + ++ [ python3 libllvm.dev ]; buildInputs = lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders - ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include; - - env.NIX_CFLAGS_COMPILE = toString ([ - "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" - ] ++ lib.optionals (!haveLibc) [ - # The compiler got stricter about this, and there is a usellvm patch below - # which patches out the assert include causing an implicit definition of - # assert. It would be nicer to understand why compiler-rt thinks it should - # be able to #include in the first place; perhaps it's in the - # wrong, or perhaps there is a way to provide an assert.h. - "-Wno-error=implicit-function-declaration" - ]); + ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include + # Adding the bootstrap SDK to `buildInputs` on static builds propagates it, breaking `xcrun`. + # This can be removed once the minimum SDK >10.12 on x86_64-darwin. + ++ lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isStatic) [ apple-sdk' ]; + + env = { + NIX_CFLAGS_COMPILE = toString ([ + "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" + ] ++ lib.optionals (!haveLibc) [ + # The compiler got stricter about this, and there is a usellvm patch below + # which patches out the assert include causing an implicit definition of + # assert. It would be nicer to understand why compiler-rt thinks it should + # be able to #include in the first place; perhaps it's in the + # wrong, or perhaps there is a way to provide an assert.h. + "-Wno-error=implicit-function-declaration" + ]); + } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin) { + # Work around clang’s trying to invoke unprefixed-ld on Darwin when `-target` is passed. + NIX_CFLAGS_LINK = "--ld-path=${stdenv.cc.bintools}/bin/${stdenv.cc.targetPrefix}ld"; + }; cmakeFlags = [ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" @@ -125,33 +141,30 @@ stdenv.mkDerivation ({ "-DCOMPILER_RT_OS_DIR=baremetal" ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) (lib.optionals (lib.versionAtLeast release_version "16") [ "-DCMAKE_LIPO=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo" + ] ++ lib.optionals (!haveLibcxx) [ + # Darwin fails to detect that the compiler supports the `-g` flag when there is no libc++ during the + # compiler-rt bootstrap, which prevents compiler-rt from building. The `-g` flag is required by the + # Darwin support, so force it to be enabled during the first stage of the compiler-rt bootstrap. + "-DCOMPILER_RT_HAS_G_FLAG=ON" ] ++ [ - "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON" + "-DDARWIN_macosx_CACHED_SYSROOT=${apple-sdk'.sdkroot}" + "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=${lib.versions.majorMinor (lib.getVersion apple-sdk)}" "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}" "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}" + "-DSANITIZER_MIN_OSX_VERSION=${stdenv.hostPlatform.darwinMinVersion}" ] ++ lib.optionals (lib.versionAtLeast release_version "15") [ # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin: # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153 "-DCOMPILER_RT_ENABLE_IOS=OFF" - ]) ++ lib.optionals (lib.versionAtLeast version "19" && stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ - "-DSANITIZER_MIN_OSX_VERSION=10.10" - ] ++ lib.optionals (noSanitizers && lib.versionAtLeast release_version "19") [ + ]) ++ lib.optionals (noSanitizers && lib.versionAtLeast release_version "19") [ "-DCOMPILER_RT_BUILD_CTX_PROFILE=OFF" ] ++ devExtraCmakeFlags; outputs = [ "out" "dev" ]; - # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks - # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra - # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd - # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by - # a flag and turn the flag off during the stdenv build. postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace cmake/config-ix.cmake \ - --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (!haveLibc) ((lib.optionalString (lib.versionAtLeast release_version "18") '' substituteInPlace lib/builtins/aarch64/sme-libc-routines.c \ --replace "" "" diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 72eafab196606..414313422064c 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -540,6 +540,23 @@ let libllvmLibdir = "${tools.libllvm.lib}/lib"; }) ] + # Backport version logic from Clang 16. This is needed by the following patch. + ++ lib.optional (lib.versionOlder (lib.versions.major metadata.release_version) "16") (fetchpatch { + name = "clang-darwin-Use-consistent-version-define-stringifying-logic.patch"; + url = "https://github.com/llvm/llvm-project/commit/60a33ded751c86fff9ac1c4bdd2b341fbe4b0649.patch?full_index=1"; + includes = [ "lib/Basic/Targets/OSTargets.cpp" ]; + stripLen = 1; + hash = "sha256-YVTSg5eZLz3po2AUczPNXCK26JA3CuTh6Iqp7hAAKIs="; + }) + # Backport `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` support from Clang 17. + # This is needed by newer SDKs (14+). + ++ lib.optional (lib.versionOlder (lib.versions.major metadata.release_version) "17") (fetchpatch { + name = "clang-darwin-An-OS-version-preprocessor-define.patch"; + url = "https://github.com/llvm/llvm-project/commit/c8e2dd8c6f490b68e41fe663b44535a8a21dfeab.patch?full_index=1"; + includes = [ "lib/Basic/Targets/OSTargets.cpp" ]; + stripLen = 1; + hash = "sha256-Vs32kql7N6qtLqc12FtZHURcbenA7+N3E/nRRX3jdig="; + }) ++ lib.optional (lib.versions.major metadata.release_version == "18") (fetchpatch { name = "tweak-tryCaptureVariable-for-unevaluated-lambdas.patch"; url = "https://github.com/llvm/llvm-project/commit/3d361b225fe89ce1d8c93639f27d689082bd8dad.patch"; @@ -764,16 +781,20 @@ let bintools = bintools'; extraPackages = [ targetLlvmLibraries.compiler-rt-no-libc ] - ++ lib.optionals (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD) [ - targetLlvmLibraries.libunwind - ]; + ++ lib.optionals + ( + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin + ) + [ + targetLlvmLibraries.libunwind + ]; extraBuildCommands = lib.optionalString (lib.versions.major metadata.release_version == "13") ( '' echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags echo "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" >> $out/nix-support/cc-cflags '' - + lib.optionalString (!stdenv.targetPlatform.isWasm) '' + + lib.optionalString (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isDarwin) '' echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags '' @@ -794,7 +815,7 @@ let "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" ] ++ lib.optional ( - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin ) "--unwindlib=libunwind" ++ lib.optional ( !stdenv.targetPlatform.isWasm @@ -803,7 +824,7 @@ let ) "-lunwind" ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; nixSupport.cc-ldflags = lib.optionals ( - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin ) [ "-L${targetLlvmLibraries.libunwind}/lib" ]; } ); @@ -991,14 +1012,11 @@ let let # temp rename to avoid infinite recursion stdenv = - if args.stdenv.hostPlatform.useLLVM or false then + # Darwin needs to use a bootstrap stdenv to avoid an infinite recursion when cross-compiling. + if args.stdenv.hostPlatform.isDarwin then + overrideCC darwin.bootstrapStdenv buildLlvmTools.clangWithLibcAndBasicRtAndLibcxx + else if args.stdenv.hostPlatform.useLLVM or false then overrideCC args.stdenv buildLlvmTools.clangWithLibcAndBasicRtAndLibcxx - else if - lib.versionAtLeast metadata.release_version "16" - && args.stdenv.hostPlatform.isDarwin - && args.stdenv.hostPlatform.isStatic - then - overrideCC args.stdenv buildLlvmTools.clangNoCompilerRtWithLibc else args.stdenv; in @@ -1017,10 +1035,10 @@ let patches = compiler-rtPatches; doFakeLibgcc = stdenv.hostPlatform.useLLVM or false; stdenv = - if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform then - stdenv + # Darwin needs to use a bootstrap stdenv to avoid an infinite recursion when cross-compiling. + if stdenv.hostPlatform.isDarwin then + overrideCC darwin.bootstrapStdenv buildLlvmTools.clangNoLibcNoRt else - # TODO: make this branch unconditional next rebuild overrideCC stdenv buildLlvmTools.clangNoLibcNoRt; }; @@ -1102,7 +1120,11 @@ let ) # https://github.com/llvm/llvm-project/issues/64226 (metadata.getVersionFile "libcxx/0001-darwin-10.12-mbstate_t-fix.patch"); - stdenv = overrideCC stdenv buildLlvmTools.clangWithLibcAndBasicRt; + stdenv = + if stdenv.hostPlatform.isDarwin then + overrideCC darwin.bootstrapStdenv buildLlvmTools.clangWithLibcAndBasicRt + else + overrideCC stdenv buildLlvmTools.clangWithLibcAndBasicRt; } // lib.optionalAttrs (lib.versionOlder metadata.release_version "14") { # TODO: remove this, causes LLVM 13 packages rebuild. diff --git a/pkgs/development/compilers/llvm/common/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index 281a21ca15242..bdaeb23827c10 100644 --- a/pkgs/development/compilers/llvm/common/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -17,6 +17,7 @@ # TODO: Can this memory corruption bug still occur? # , enableGoldPlugin ? libbfd.hasPluginAPI +, ld64 , libbfd , libpfm , libxml2 @@ -46,6 +47,11 @@ let inherit (lib) optional optionals optionalString; + # Is there a better way to do this? Darwin wants to disable tests in the first + # LLVM rebuild, but overriding doesn’t work when building libc++, libc++abi, + # and libunwind. It also wants to disable LTO in the first rebuild. + isDarwinBootstrap = lib.getName stdenv == "bootstrap-stage-xclang-stdenv-darwin"; + # Used when creating a version-suffixed symlink of libLLVM.dylib shortVersion = lib.concatStringsSep "." (lib.take 1 (lib.splitString "." release_version)); @@ -66,7 +72,7 @@ let # # So, we "manually" assemble one python derivation for the package to depend # on, taking into account whether checks are enabled or not: - python = if doCheck then + python = if doCheck && !isDarwinBootstrap then # Note that we _explicitly_ ask for a python interpreter for our host # platform here; the splicing that would ordinarily take care of this for # us does not seem to work once we use `withPackages`. @@ -91,14 +97,14 @@ let patches' = patches ++ lib.optionals enablePolly pollyPatches; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation (finalAttrs: { inherit pname version; src = src'; patches = patches'; sourceRoot = if lib.versionOlder release_version "13" then null - else "${src.name}/${pname}"; + else "${finalAttrs.src.name}/${pname}"; outputs = [ "out" "lib" "dev" "python" ]; @@ -342,13 +348,13 @@ stdenv.mkDerivation (rec { ]; in flagsForLlvmConfig ++ [ "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" + "-DLLVM_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}" "-DLLVM_ENABLE_FFI=ON" "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_ENABLE_DUMP=ON" (lib.cmakeBool "LLVM_ENABLE_TERMINFO" enableTerminfo) - ] ++ optionals (!doCheck) [ + ] ++ optionals (!finalAttrs.finalPackage.doCheck) [ "-DLLVM_INCLUDE_TESTS=OFF" ] ++ optionals stdenv.hostPlatform.isStatic [ # Disables building of shared libs, -fPIC is still injected by cc-wrapper @@ -428,7 +434,7 @@ stdenv.mkDerivation (rec { cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native ''); - inherit doCheck; + doCheck = !isDarwinBootstrap && doCheck; checkTarget = "check-all"; diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index abb66b38e3cc3..a938918ead3a4 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -11,7 +11,7 @@ , tcl ? null, tk ? null, tix ? null, libX11 ? null, x11Support ? false , zlib , self -, configd, coreutils +, coreutils , autoreconfHook , python-setup-hook # Some proprietary libs assume UCS2 unicode, especially on darwin :( @@ -239,8 +239,7 @@ let buildInputs = lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ [ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ] - ++ lib.optionals x11Support [ tcl tk libX11 ] - ++ lib.optional (stdenv.hostPlatform.isDarwin && configd != null) configd; + ++ lib.optionals x11Support [ tcl tk libX11 ]; nativeBuildInputs = [ autoreconfHook ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 37764506e2964..b381243ff5bb7 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -25,7 +25,7 @@ # platform-specific dependencies , bash -, configd +, apple-sdk_11 , darwin , windows @@ -178,11 +178,12 @@ let bluez ] ++ optionals enableFramework [ darwin.apple_sdk.frameworks.Cocoa + ] ++ optionals stdenv.hostPlatform.isDarwin [ + # Work around for ld64 crashes on x86_64-darwin. Remove once 11.0 becomes the default. + apple-sdk_11 ] ++ optionals stdenv.hostPlatform.isMinGW [ windows.dlfcn windows.mingw_w64_pthreads - ] ++ optionals stdenv.hostPlatform.isDarwin [ - configd ] ++ optionals tzdataSupport [ tzdata ] ++ optionals withGdbm [ @@ -362,9 +363,6 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { (enableFeature enableGIL "gil") ] ++ optionals enableOptimizations [ "--enable-optimizations" - ] ++ optionals (stdenv.hostPlatform.isDarwin && configd == null) [ - # Make conditional on Darwin for now to avoid causing Linux rebuilds. - "py_cv_module__scproxy=n/a" ] ++ optionals (sqlite != null) [ "--enable-loadable-sqlite-extensions" ] ++ optionals (libxcrypt != null) [ diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index b936ea1e222a3..40333fbefd03b 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -38,7 +38,6 @@ in { suffix = ".8"; # ActiveState's Python 2 extended support }; hash = "sha256-HUOzu3uJbtd+3GbmGD35KOk/CDlwL4S7hi9jJGRFiqI="; - inherit (darwin) configd; inherit passthruFun; }; @@ -51,7 +50,6 @@ in { suffix = ""; }; hash = "sha256-aygSee/YUpTS1pk+FzmDpXRkwBM5Vvu7VTbslka+rww="; - inherit (darwin) configd; inherit passthruFun; }; @@ -64,7 +62,6 @@ in { suffix = ""; }; hash = "sha256-qrCVCBdzUXJgGHmHLZN8HkkopXxAmuAjaew9kdzOvnk="; - inherit (darwin) configd; inherit passthruFun; }; @@ -77,13 +74,11 @@ in { suffix = ""; }; hash = "sha256-B6Q1bpEpAOYaFcsJSaBsSgUBLiE+zWtOhND2equ+43I="; - inherit (darwin) configd; inherit passthruFun; }; python312 = callPackage ./cpython ({ self = __splicedPackages.python312; - inherit (darwin) configd; inherit passthruFun; } // sources.python312); @@ -96,7 +91,6 @@ in { suffix = ""; }; hash = "sha256-CG3liC48sxDU3KSEV1IuLkgBjs1D2pzfgn9qB1nvsH0="; - inherit (darwin) configd; inherit passthruFun; }; # Minimal versions of Python (built without optional dependencies) @@ -109,7 +103,6 @@ in { readline = null; ncurses = null; gdbm = null; - configd = null; sqlite = null; tzdata = null; libffi = libffiBoot; # without test suite diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix index 8d1d36344d7e1..7f9aac48e7258 100644 --- a/pkgs/development/libraries/libuv/default.nix +++ b/pkgs/development/libraries/libuv/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , autoconf , automake +, darwin , libtool , pkg-config , pkgsStatic @@ -86,6 +87,8 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ automake autoconf libtool pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ]; + preConfigure = '' LIBTOOLIZE=libtoolize ./autogen.sh ''; diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix deleted file mode 100644 index e30700ca20258..0000000000000 --- a/pkgs/development/tools/xcbuild/default.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ lib, stdenv, cmake, fetchFromGitHub, zlib, libxml2, libpng -, CoreServices, CoreGraphics, ImageIO, ninja }: - -let - googletest = fetchFromGitHub { - owner = "google"; - repo = "googletest"; - rev = "43359642a1c16ad3f4fc575c7edd0cb935810815"; - sha256 = "0y4xaah62fjr3isaryc3vfz3mn9xflr00vchdimj8785milxga4q"; - }; - - linenoise = fetchFromGitHub { - owner = "antirez"; - repo = "linenoise"; - rev = "c894b9e59f02203dbe4e2be657572cf88c4230c3"; - sha256 = "0wasql7ph5g473zxhc2z47z3pjp42q0dsn4gpijwzbxawid71b4w"; - }; -in stdenv.mkDerivation { - pname = "xcbuild"; - - # Once a version is released that includes - # https://github.com/facebook/xcbuild/commit/183c087a6484ceaae860c6f7300caf50aea0d710, - # we can stop doing this -pre thing. - version = "0.1.2-pre"; - - src = fetchFromGitHub { - owner = "facebook"; - repo = "xcbuild"; - rev = "32b9fbeb69bfa2682bd0351ec2f14548aaedd554"; - sha256 = "1xxwg2849jizxv0g1hy0b1m3i7iivp9bmc4f5pi76swsn423d41m"; - }; - - patches = [ ./includes.patch ]; - - prePatch = '' - rmdir ThirdParty/* - cp -r --no-preserve=all ${googletest} ThirdParty/googletest - cp -r --no-preserve=all ${linenoise} ThirdParty/linenoise - ''; - - postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' - # Fix build on gcc-13 due to missing includes - sed -e '1i #include ' -i \ - Libraries/libutil/Headers/libutil/Permissions.h \ - Libraries/pbxbuild/Headers/pbxbuild/Tool/AuxiliaryFile.h \ - Libraries/pbxbuild/Headers/pbxbuild/Tool/Invocation.h - - # Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror. - sed 1i'#include ' \ - -i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - # Apple Open Sourced LZFSE, but not libcompression, and it isn't - # part of an impure framework we can add - substituteInPlace Libraries/libcar/Sources/Rendition.cpp \ - --replace "#if HAVE_LIBCOMPRESSION" "#if 0" - ''; - - # TODO: instruct cmake not to put it in /usr, rather than cleaning up - postInstall = '' - mv $out/usr/* $out - rmdir $out/usr - cp liblinenoise.* $out/lib/ - ''; - - env.NIX_CFLAGS_COMPILE = "-Wno-error"; - - cmakeFlags = [ "-GNinja" ]; - - nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ zlib libxml2 libpng ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices CoreGraphics ImageIO ]; - - meta = with lib; { - description = "Xcode-compatible build tool"; - homepage = "https://github.com/facebook/xcbuild"; - platforms = platforms.unix; - maintainers = with maintainers; [ copumpkin matthewbauer ]; - license = with licenses; [ bsd2 bsd3 ]; - }; -} diff --git a/pkgs/development/tools/xcbuild/sdks.nix b/pkgs/development/tools/xcbuild/sdks.nix deleted file mode 100644 index bf16bf132d774..0000000000000 --- a/pkgs/development/tools/xcbuild/sdks.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ runCommand, lib, toolchainName, sdkName -, writeText, xcodePlatform, sdkVer, productBuildVer }: - -let - inherit (lib.generators) toPlist toJSON; - - SDKSettings = { - CanonicalName = sdkName; - DisplayName = sdkName; - Toolchains = [ toolchainName ]; - Version = sdkVer; - MaximumDeploymentTarget = sdkVer; - isBaseSDK = "YES"; - }; - - SystemVersion = lib.optionalAttrs (productBuildVer != null) { - ProductBuildVersion = productBuildVer; - } // { - ProductName = "Mac OS X"; - ProductVersion = sdkVer; - }; -in - -runCommand "SDKs" {} '' - sdk=$out/${sdkName}.sdk - install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $sdk/SDKSettings.plist - install -D ${writeText "SDKSettings.json" (toJSON {} SDKSettings)} $sdk/SDKSettings.json - install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $sdk/System/Library/CoreServices/SystemVersion.plist - ln -s $sdk $sdk/usr - - ln -s $sdk $out/${xcodePlatform}.sdk -'' diff --git a/pkgs/development/tools/xcbuild/toolchains.nix b/pkgs/development/tools/xcbuild/toolchains.nix deleted file mode 100644 index 2da12ba7cbcbe..0000000000000 --- a/pkgs/development/tools/xcbuild/toolchains.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ runCommand, toolchainName, fetchurl, stdenv -, buildPackages, lib, writeText }: - -let - - inherit (lib) getBin optionalString; - inherit (lib.generators) toPlist; - - ToolchainInfo = { - Identifier = toolchainName; - }; - - # We could pull this out of developer_cmds but it adds an annoying - # loop if we want to bootstrap and this is just a tiny script so I'm - # not going to bother. - mkdep-darwin-src = fetchurl { - url = "https://opensource.apple.com/source/developer_cmds/developer_cmds-63/mkdep/mkdep.sh"; - sha256 = "0n4wpqfslfjs5zbys5yri8pfi2awyhlmknsf6laa5jzqbzq9x541"; - executable = true; - }; -in - -runCommand "Toolchains" {} ('' - toolchain=$out/XcodeDefault.xctoolchain - mkdir -p $toolchain - - install -D ${writeText "ToolchainInfo.plist" (toPlist {} ToolchainInfo)} $toolchain/ToolchainInfo.plist - - ln -s $toolchain $toolchain/usr - - mkdir -p $toolchain/include - mkdir -p $toolchain/lib - mkdir -p $toolchain/libexec - mkdir -p $toolchain/share - mkdir -p $toolchain/bin - - for bin in ${getBin stdenv.cc}/bin/*; do - ln -s $bin $toolchain/bin - done - - for bin in ${getBin stdenv.cc.bintools.bintools}/bin/*; do - if ! [ -e "$toolchain/bin/$(basename $bin)" ]; then - ln -s $bin $toolchain/bin - fi - done - - ln -s ${buildPackages.bison}/bin/yacc $toolchain/bin/yacc - ln -s ${buildPackages.bison}/bin/bison $toolchain/bin/bison - ln -s ${buildPackages.flex}/bin/flex $toolchain/bin/flex - ln -s ${buildPackages.flex}/bin/flex++ $toolchain/bin/flex++ - ln -s $toolchain/bin/flex $toolchain/bin/lex - - ln -s ${buildPackages.m4}/bin/m4 $toolchain/bin/m4 - ln -s $toolchain/bin/m4 $toolchain/bin/gm4 - - ln -s ${buildPackages.unifdef}/bin/unifdef $toolchain/bin/unifdef - ln -s ${buildPackages.unifdef}/bin/unifdefall $toolchain/bin/unifdefall - - ln -s ${buildPackages.gperf}/bin/gperf $toolchain/bin/gperf - ln -s ${buildPackages.indent}/bin/indent $toolchain/bin/indent - ln -s ${buildPackages.ctags}/bin/ctags $toolchain/bin/ctags -'' + optionalString stdenv.hostPlatform.isDarwin '' - for bin in ${getBin buildPackages.cctools}/bin/*; do - if ! [ -e "$toolchain/bin/$(basename $bin)" ]; then - ln -s $bin $toolchain/bin - fi - done - - ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $toolchain/bin - mkdir -p $toolchain/libexec - ln -s ${buildPackages.darwin.bootstrap_cmds}/libexec/migcom $toolchain/libexec - ln -s ${mkdep-darwin-src} $toolchain/bin/mkdep -'') diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix deleted file mode 100644 index 9c8c846e5cca6..0000000000000 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ /dev/null @@ -1,167 +0,0 @@ -{ lib, stdenv, makeWrapper, writeText, writeTextFile, runCommand, callPackage -, CoreServices, ImageIO, CoreGraphics -, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX" -, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1" -, sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" -, productBuildVer ? null -}: - -let - - toolchainName = "com.apple.dt.toolchain.XcodeDefault"; - sdkName = "${xcodePlatform}${sdkVer}"; - xcrunSdkName = lib.toLower xcodePlatform; - - # TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here. - sdkBuildVersion = "17E189"; - xcodeSelectVersion = "2349"; - - xcbuild = callPackage ./default.nix { - inherit CoreServices ImageIO CoreGraphics stdenv; - }; - - toolchains = callPackage ./toolchains.nix { - inherit toolchainName stdenv; - }; - - sdks = callPackage ./sdks.nix { - inherit toolchainName sdkName xcodePlatform sdkVer productBuildVer; - }; - - platforms = callPackage ./platforms.nix { - inherit sdks xcodePlatform stdenv; - }; - - xcconfig = writeText "nix.xcconfig" '' - SDKROOT=${sdkName} - ''; - - xcode-select = writeText "xcode-select" '' -#!${stdenv.shell} -while [ $# -gt 0 ]; do - case "$1" in - -h | --help) ;; # noop - -s | --switch) shift;; # noop - -r | --reset) ;; # noop - -v | --version) echo xcode-select version ${xcodeSelectVersion} ;; - -p | -print-path | --print-path) echo @DEVELOPER_DIR@ ;; - --install) ;; # noop - esac - shift -done - ''; - - xcrun = writeTextFile { - name = "xcrun"; - executable = true; - destination = "/bin/xcrun"; - text = '' -#!${stdenv.shell} -args=( "$@" ) - -# If an SDK was requested, check that it matches. -for ((i = 0; i < ''${#args[@]}; i++)); do - case "''${args[i]}" in - --sdk | -sdk) - i=$((i + 1)) - if [[ "''${args[i]}" != '${xcrunSdkName}' ]]; then - echo >&2 "xcodebuild: error: SDK \"''${args[i]}\" cannot be located." - exit 1 - fi - ;; - esac -done - -while [ $# -gt 0 ]; do - case "$1" in - --sdk | -sdk) shift ;; - --toolchain | -toolchain) shift ;; - --find | -find | -f) - shift - command -v $1 || exit 1 ;; - --log | -log) ;; # noop - --verbose | -verbose) ;; # noop - --no-cache | -no-cache) ;; # noop - --kill-cache | -kill-cache) ;; # noop - --show-sdk-path | -show-sdk-path) - echo ${sdks}/${sdkName}.sdk ;; - --show-sdk-platform-path | -show-sdk-platform-path) - echo ${platforms}/${xcodePlatform}.platform ;; - --show-sdk-version | -show-sdk-version) - echo ${sdkVer} ;; - --show-sdk-build-version | -show-sdk-build-version) - echo ${sdkBuildVersion} ;; - *) break ;; - esac - shift -done - -if ! [[ -z "$@" ]]; then - exec "$@" -fi - ''; - checkPhase = '' - ${stdenv.shellDryRun} "$target" - ''; - }; - -in - -runCommand "xcodebuild-${xcbuild.version}" { - nativeBuildInputs = [ makeWrapper ]; - inherit (xcbuild) meta; - - # ensure that the toolchain goes in PATH - propagatedBuildInputs = [ "${toolchains}/XcodeDefault.xctoolchain" ]; - - passthru = { - inherit xcbuild xcrun; - toolchain = "${toolchains}/XcodeDefault.xctoolchain"; - sdk = "${sdks}/${sdkName}"; - platform = "${platforms}/${xcodePlatform}.platform"; - }; - - preferLocalBuild = true; -} '' - mkdir -p $out/bin - - ln -s $out $out/usr - - mkdir -p $out/Library/Xcode - ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications - - ln -s ${platforms} $out/Platforms - ln -s ${toolchains} $out/Toolchains - - mkdir -p $out/Applications/Xcode.app/Contents - ln -s $out $out/Applications/Xcode.app/Contents/Developer - - # The native xcodebuild command supports an invocation like "xcodebuild -version -sdk" without specifying the specific SDK, so we simulate this by - # detecting this case and simulating the output; printing the header and appending the normal output via appending the sdk version to the positional - # arguments we pass through to the wrapped xcodebuild. - makeWrapper ${xcbuild}/bin/xcodebuild $out/bin/xcodebuild \ - --add-flags "-xcconfig ${xcconfig}" \ - --add-flags "DERIVED_DATA_DIR=." \ - --set DEVELOPER_DIR "$out" \ - --set SDKROOT ${sdkName} \ - --run '[ "$#" -eq 2 ] && [ "$1" = "-version" ] && [ "$2" = "-sdk" ] && echo ${sdkName}.sdk - macOS ${sdkVer} \(macosx${sdkVer}\) && set -- "$@" "${sdkName}"' \ - --run '[ "$1" = "-version" ] && [ "$#" -eq 1 ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0' \ - --run '[ "$1" = "-license" ] && exit 0' - - substitute ${xcode-select} $out/bin/xcode-select \ - --subst-var-by DEVELOPER_DIR $out/Applications/Xcode.app/Contents/Developer - chmod +x $out/bin/xcode-select - - cp ${xcrun}/bin/xcrun $out/bin/xcrun - - for bin in PlistBuddy actool builtin-copy builtin-copyPlist \ - builtin-copyStrings builtin-copyTiff \ - builtin-embeddedBinaryValidationUtility \ - builtin-infoPlistUtility builtin-lsRegisterURL \ - builtin-productPackagingUtility builtin-validationUtility \ - lsbom plutil; do - ln -s ${xcbuild}/bin/$bin $out/bin/$bin - done - - fixupPhase -'' diff --git a/pkgs/os-specific/darwin/CoreSymbolication/default.nix b/pkgs/os-specific/darwin/CoreSymbolication/default.nix deleted file mode 100644 index f6b0e2b79c3d3..0000000000000 --- a/pkgs/os-specific/darwin/CoreSymbolication/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - fetchFromGitHub, - fetchpatch, - stdenvNoCC, - darwin-stubs, -}: - -stdenvNoCC.mkDerivation (finalAttrs: { - pname = "CoreSymbolication"; - inherit (darwin-stubs) version; - - src = fetchFromGitHub { - repo = "CoreSymbolication"; - owner = "matthewbauer"; - rev = "24c87c23664b3ee05dc7a5a87d647ae476a680e4"; - hash = "sha256-PzvLq94eNhP0+rLwGMKcMzxuD6MlrNI7iT/eV0obtSE="; - }; - - patches = [ - # Add missing symbol definitions needed to build `zlog` in system_cmds. - # https://github.com/matthewbauer/CoreSymbolication/pull/2 - (fetchpatch { - url = "https://github.com/matthewbauer/CoreSymbolication/commit/ae7ac6a7043dbae8e63d6ce5e63dfaf02b5977fe.patch"; - hash = "sha256-IuXGMsaR1LIGs+BpDU1b4YlznKm9VhK5DQ+Dthtb1mI="; - }) - (fetchpatch { - url = "https://github.com/matthewbauer/CoreSymbolication/commit/6531da946949a94643e6d8424236174ae64fe0ca.patch"; - hash = "sha256-+nDX04yY92yVT9KxiAFY2LxKcS7P8JpU539K+YVRqV4="; - }) - ]; - - dontBuild = true; - - installPhase = '' - runHook preInstall - - mkdir -p $out/Library/Frameworks/CoreSymbolication.framework/Versions/A/Headers - - ln -s A $out/Library/Frameworks/CoreSymbolication.framework/Versions/Current - ln -s Versions/Current/Headers $out/Library/Frameworks/CoreSymbolication.framework/Headers - ln -s Versions/Current/CoreSymbolication.tbd $out/Library/Frameworks/CoreSymbolication.framework/CoreSymbolication.tbd - - cp *.h $out/Library/Frameworks/CoreSymbolication.framework/Versions/A/Headers - cp ${darwin-stubs}/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication.tbd \ - $out/Library/Frameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication.tbd - - runHook postInstall - ''; - - meta = with lib; { - description = "Reverse engineered headers for Apple's CoreSymbolication framework"; - homepage = "https://github.com/matthewbauer/CoreSymbolication"; - license = licenses.mit; - platforms = platforms.darwin; - maintainers = with maintainers; [ matthewbauer ]; - }; -}) diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix deleted file mode 100644 index fdc3bd45e55ee..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix +++ /dev/null @@ -1,268 +0,0 @@ -{ lib, stdenvNoCC, buildPackages, fetchurl, xar, cpio, pkgs, python3, pbzx, MacOSX-SDK }: - -# TODO: reorganize to make this just frameworks, and move libs to default.nix - -let - stdenv = stdenvNoCC; - - standardFrameworkPath = name: private: - "/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework"; - - mkDepsRewrites = deps: - let - mergeRewrites = x: y: { - prefix = lib.mergeAttrs (x.prefix or {}) (y.prefix or {}); - const = lib.mergeAttrs (x.const or {}) (y.const or {}); - }; - - rewriteArgs = { prefix ? {}, const ? {} }: lib.concatLists ( - (lib.mapAttrsToList (from: to: [ "-p" "${from}:${to}" ]) prefix) ++ - (lib.mapAttrsToList (from: to: [ "-c" "${from}:${to}" ]) const) - ); - - rewrites = depList: lib.fold mergeRewrites {} - (map (dep: dep.tbdRewrites) - (lib.filter (dep: dep ? tbdRewrites) depList)); - in - lib.escapeShellArgs (rewriteArgs (rewrites (builtins.attrValues deps))); - - mkFramework = { name, deps, private ? false }: - let self = stdenv.mkDerivation { - pname = "apple-${lib.optionalString private "private-"}framework-${name}"; - version = MacOSX-SDK.version; - - dontUnpack = true; - - # because we copy files from the system - preferLocalBuild = true; - - disallowedRequisites = [ MacOSX-SDK ]; - - nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ]; - - installPhase = '' - mkdir -p $out/Library/Frameworks - - cp -r ${MacOSX-SDK}${standardFrameworkPath name private} $out/Library/Frameworks - - if [[ -d ${MacOSX-SDK}/usr/lib/swift/${name}.swiftmodule ]]; then - mkdir -p $out/lib/swift - cp -r -t $out/lib/swift \ - ${MacOSX-SDK}/usr/lib/swift/${name}.swiftmodule \ - ${MacOSX-SDK}/usr/lib/swift/libswift${name}.tbd - fi - - # Fix and check tbd re-export references - chmod u+w -R $out - find $out -name '*.tbd' -type f | while read tbd; do - echo "Fixing re-exports in $tbd" - rewrite-tbd \ - -p ${standardFrameworkPath name private}/:$out/Library/Frameworks/${name}.framework/ \ - -p /usr/lib/swift/:$out/lib/swift/ \ - ${mkDepsRewrites deps} \ - -r ${builtins.storeDir} \ - "$tbd" - done - ''; - - propagatedBuildInputs = builtins.attrValues deps; - - passthru = { - tbdRewrites = { - prefix."${standardFrameworkPath name private}/" = "${self}/Library/Frameworks/${name}.framework/"; - }; - }; - - meta = with lib; { - description = "Apple SDK framework ${name}"; - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - }; - }; - in self; - - framework = name: deps: mkFramework { inherit name deps; private = false; }; - privateFramework = name: deps: mkFramework { inherit name deps; private = true; }; -in rec { - libs = { - xpc = stdenv.mkDerivation { - name = "apple-lib-xpc"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include - pushd $out/include >/dev/null - cp -r "${MacOSX-SDK}/usr/include/xpc" $out/include/xpc - cp "${MacOSX-SDK}/usr/include/launch.h" $out/include/launch.h - popd >/dev/null - ''; - }; - - Xplugin = stdenv.mkDerivation { - name = "apple-lib-Xplugin"; - dontUnpack = true; - - propagatedBuildInputs = with frameworks; [ - OpenGL ApplicationServices Carbon IOKit CoreGraphics CoreServices CoreText - ]; - - installPhase = '' - mkdir -p $out/include $out/lib - ln -s "${MacOSX-SDK}/include/Xplugin.h" $out/include/Xplugin.h - cp ${MacOSX-SDK}/usr/lib/libXplugin.1.tbd $out/lib - ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd - ''; - }; - - utmp = stdenv.mkDerivation { - name = "apple-lib-utmp"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include - pushd $out/include >/dev/null - ln -s "${MacOSX-SDK}/include/utmp.h" - ln -s "${MacOSX-SDK}/include/utmpx.h" - popd >/dev/null - ''; - }; - - sandbox = stdenv.mkDerivation { - name = "apple-lib-sandbox"; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/include $out/lib - ln -s "${MacOSX-SDK}/usr/include/sandbox.h" $out/include/sandbox.h - cp "${MacOSX-SDK}/usr/lib/libsandbox.1.tbd" $out/lib - ln -s libsandbox.1.tbd $out/lib/libsandbox.tbd - ''; - }; - - libDER = stdenv.mkDerivation { - name = "apple-lib-libDER"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/include - cp -r ${MacOSX-SDK}/usr/include/libDER $out/include - ''; - }; - - simd = stdenv.mkDerivation { - name = "apple-lib-simd"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/include - cp -r ${MacOSX-SDK}/usr/include/simd $out/include - ''; - }; - }; - - frameworks = let - # Dependency map created by gen-frameworks.py. - generatedDeps = import ./frameworks.nix { - inherit frameworks libs; - }; - - # Additional dependencies that are not picked up by gen-frameworks.py. - # Some of these are simply private frameworks the generator does not see. - extraDeps = with libs; with frameworks; let - inherit (pkgs.darwin.apple_sdk_11_0) libnetwork; - libobjc = pkgs.darwin.apple_sdk_11_0.objc4; - in { - # Below this comment are entries migrated from before the generator was - # added. If, for a given framework, you are able to reverify the extra - # deps are really necessary on top of the generator deps, move it above - # this comment (and maybe document your findings). - AVFoundation = { inherit ApplicationServices AVFCapture AVFCore; }; - Accelerate = { inherit CoreWLAN IOBluetooth; }; - AddressBook = { inherit AddressBookCore ContactsPersistence libobjc; }; - AppKit = { inherit AudioToolbox AudioUnit UIFoundation; }; - AudioToolbox = { inherit AudioToolboxCore; }; - AudioUnit = { inherit Carbon CoreAudio; }; - Carbon = { inherit IOKit QuartzCore libobjc; }; - CoreAudio = { inherit IOKit; }; - CoreFoundation = { inherit libobjc; }; - CoreGraphics = { inherit SystemConfiguration; }; - CoreMIDIServer = { inherit CoreMIDI; }; - CoreMedia = { inherit ApplicationServices AudioToolbox AudioUnit; }; - CoreServices = { inherit CoreAudio NetFS ServiceManagement; }; - CoreWLAN = { inherit SecurityFoundation; }; - DiscRecording = { inherit IOKit libobjc; }; - Foundation = { inherit SystemConfiguration libobjc; }; - GameKit = { inherit GameCenterFoundation GameCenterUI GameCenterUICore ReplayKit; }; - ICADevices = { inherit Carbon libobjc; }; - IOBluetooth = { inherit CoreBluetooth; }; - JavaScriptCore = { inherit libobjc; }; - Kernel = { inherit IOKit; }; - LinkPresentation = { inherit URLFormatting; }; - MediaToolbox = { inherit AudioUnit; }; - MetricKit = { inherit SignpostMetrics; }; - Network = { inherit libnetwork; }; - PCSC = { inherit CoreData; }; - PassKit = { inherit PassKitCore; }; - QTKit = { inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox; }; - Quartz = { inherit QTKit; }; - QuartzCore = { inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc; }; - Security = { inherit IOKit libDER; }; - TWAIN = { inherit Carbon; }; - VideoDecodeAcceleration = { inherit CoreVideo; }; - WebKit = { inherit ApplicationServices Carbon libobjc; }; - }; - - # Overrides for framework derivations. - overrides = super: { - CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { - setupHook = ./cf-setup-hook.sh; - }); - - # This framework doesn't exist in newer SDKs (somewhere around 10.13), but - # there are references to it in nixpkgs. - QuickTime = throw "QuickTime framework not available"; - - # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 - JavaVM = super.JavaNativeFoundation; - - CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { - installPhase = drv.installPhase + '' - # When used as a module, complains about a missing import for - # Darwin.C.stdint. Apparently fixed in later SDKs. - sed -e "/CFBase.h/ i #include " \ - -i $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h - ''; - }); - - System = lib.overrideDerivation super.System (drv: { - installPhase = drv.installPhase + '' - # 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 installing 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 - # Thus, it is easier to replace the file than to fix the symlink. - cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ - $out/Library/Frameworks/System.framework/Versions/B/System.tbd - ''; - }); - }; - - # Merge extraDeps into generatedDeps. - deps = generatedDeps // ( - lib.mapAttrs - (name: deps: generatedDeps.${name} // deps) - extraDeps - ); - - # Create derivations, and add private frameworks. - bareFrameworks = (lib.mapAttrs framework deps) // ( - lib.mapAttrs privateFramework (import ./private-frameworks.nix { - inherit frameworks; - libobjc = pkgs.darwin.apple_sdk_11_0.objc4; - }) - ); - in - # Apply derivation overrides. - bareFrameworks // overrides bareFrameworks; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh deleted file mode 100644 index b64eb95f2ded7..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh +++ /dev/null @@ -1,6 +0,0 @@ -forceLinkCoreFoundationFramework() { - NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}" - NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" -} - -preConfigureHooks+=(forceLinkCoreFoundationFramework) diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix index c64f011c0534d..889f484b0475c 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix @@ -1,160 +1,303 @@ -{ stdenvNoCC, fetchurl, newScope, lib, pkgs -, stdenv, overrideCC -, xar, cpio, python3, pbzx }: +# Compatibility stubs for packages that used the old SDK frameworks. +# TODO(@reckenrode) Make these stubs warn after framework usage has been cleaned up in nixpkgs. +{ + lib, + callPackage, + newScope, + overrideSDK, + pkgs, + stdenv, + stdenvNoCC, +}: let - mkSusDerivation = args: stdenvNoCC.mkDerivation (args // { - dontBuild = true; - darwinDontCodeSign = true; + mkStub = callPackage ../apple-sdk/mk-stub.nix { } "11.0"; - nativeBuildInputs = [ cpio pbzx ]; + stdenvs = + { + stdenv = overrideSDK stdenv "11.0"; + } + // builtins.listToAttrs ( + map + (v: { + name = "llvmPackages_${v}"; + value = pkgs."llvmPackages_${v}" // { + stdenv = overrideSDK pkgs."llvmPackages_${v}".stdenv "11.0"; + }; + }) + [ + "12" + "13" + "14" + "15" + "16" + ] + ); +in +stdenvs +// lib.genAttrs [ + "CLTools_Executables" + "IOKit" + "Libsystem" + "LibsystemCross" + "MacOSX-SDK" + "configd" + "darwin-stubs" + "libcharset" + "libcompression" + "libnetwork" + "libpm" + "libunwind" + "objc4" + "sdkRoot" +] mkStub +// { + frameworks = lib.genAttrs [ + "AGL" + "AVFCapture" + "AVFCore" + "AVFoundation" + "AVKit" + "Accelerate" + "Accessibility" + "Accounts" + "AdServices" + "AdSupport" + "AddressBook" + "AddressBookCore" + "AppKit" + "AppTrackingTransparency" + "Apple80211" + "AppleScriptKit" + "AppleScriptObjC" + "ApplicationServices" + "AudioToolbox" + "AudioToolboxCore" + "AudioUnit" + "AudioVideoBridging" + "AuthenticationServices" + "AutomaticAssessmentConfiguration" + "Automator" + "BackgroundTasks" + "BusinessChat" + "CFNetwork" + "CalendarStore" + "CallKit" + "Carbon" + "ClassKit" + "CloudKit" + "Cocoa" + "Collaboration" + "ColorSync" + "Combine" + "Contacts" + "ContactsPersistence" + "ContactsUI" + "CoreAudio" + "CoreAudioKit" + "CoreAudioTypes" + "CoreBluetooth" + "CoreData" + "CoreDisplay" + "CoreFoundation" + "CoreGraphics" + "CoreHaptics" + "CoreImage" + "CoreLocation" + "CoreMIDI" + "CoreMIDIServer" + "CoreML" + "CoreMedia" + "CoreMediaIO" + "CoreMotion" + "CoreServices" + "CoreSpotlight" + "CoreSymbolication" + "CoreTelephony" + "CoreText" + "CoreVideo" + "CoreWLAN" + "CryptoKit" + "CryptoTokenKit" + "DVDPlayback" + "DebugSymbols" + "DeveloperToolsSupport" + "DeviceCheck" + "DirectoryService" + "DiscRecording" + "DiscRecordingUI" + "DiskArbitration" + "DisplayServices" + "DriverKit" + "EventKit" + "ExceptionHandling" + "ExecutionPolicy" + "ExternalAccessory" + "FWAUserLib" + "FileProvider" + "FileProviderUI" + "FinderSync" + "ForceFeedback" + "Foundation" + "GLKit" + "GLUT" + "GSS" + "GameCenterFoundation" + "GameCenterUI" + "GameCenterUICore" + "GameController" + "GameKit" + "GameplayKit" + "HIDDriverKit" + "Hypervisor" + "ICADevices" + "IMServicePlugIn" + "IOBluetooth" + "IOBluetoothUI" + "IOKit" + "IOSurface" + "IOUSBHost" + "IdentityLookup" + "ImageCaptureCore" + "ImageIO" + "InputMethodKit" + "InstallerPlugins" + "InstantMessage" + "Intents" + "JavaNativeFoundation" + "JavaRuntimeSupport" + "JavaScriptCore" + "JavaVM" + "Kerberos" + "Kernel" + "KernelManagement" + "LDAP" + "LatentSemanticMapping" + "LinkPresentation" + "LocalAuthentication" + "MLCompute" + "MapKit" + "MediaAccessibility" + "MediaLibrary" + "MediaPlayer" + "MediaRemote" + "MediaToolbox" + "Message" + "Metal" + "MetalKit" + "MetalPerformanceShaders" + "MetalPerformanceShadersGraph" + "MetricKit" + "ModelIO" + "MultipeerConnectivity" + "MultitouchSupport" + "NaturalLanguage" + "NearbyInteraction" + "NetFS" + "Network" + "NetworkExtension" + "NetworkingDriverKit" + "NotificationCenter" + "OSAKit" + "OSLog" + "OpenAL" + "OpenCL" + "OpenDirectory" + "OpenGL" + "PCIDriverKit" + "PCSC" + "PDFKit" + "ParavirtualizedGraphics" + "PassKit" + "PassKitCore" + "PencilKit" + "Photos" + "PhotosUI" + "PreferencePanes" + "PushKit" + "Python" + "QTKit" + "Quartz" + "QuartzCore" + "QuickLook" + "QuickLookThumbnailing" + "QuickTime" + "RealityKit" + "ReplayKit" + "Ruby" + "SafariServices" + "SceneKit" + "ScreenSaver" + "ScreenTime" + "ScriptingBridge" + "Security" + "SecurityFoundation" + "SecurityInterface" + "SensorKit" + "ServiceManagement" + "SignpostMetrics" + "SkyLight" + "Social" + "SoundAnalysis" + "Speech" + "SpriteKit" + "StoreKit" + "SwiftUI" + "SyncServices" + "System" + "SystemConfiguration" + "SystemExtensions" + "TWAIN" + "Tcl" + "Tk" + "UIFoundation" + "URLFormatting" + "USBDriverKit" + "UniformTypeIdentifiers" + "UserNotifications" + "UserNotificationsUI" + "VideoDecodeAcceleration" + "VideoSubscriberAccount" + "VideoToolbox" + "Virtualization" + "Vision" + "WebKit" + "WidgetKit" + "iTunesLibrary" + "vmnet" + ] mkStub; - outputs = [ "out" ]; + libs = lib.genAttrs [ + "Xplugin" + "utmp" + "libDER" + "xpc" + "sandbox" + "simd" + ] mkStub; - unpackPhase = '' - pbzx $src | cpio -idm - ''; - - passthru = { - inherit (args) version; - }; - }); - - MacOSX-SDK = mkSusDerivation { - pname = "MacOSX-SDK"; - version = "11.0.0"; - - # https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog - src = fetchurl { - url = "http://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_macOSNMOS_SDK.pkg"; - sha256 = "0n425smj4q1vxbza8fzwnk323fyzbbq866q32w288c44hl5yhwsf"; - }; - - installPhase = '' - mv Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk $out - ''; - }; - - CLTools_Executables = mkSusDerivation { - pname = "CLTools_Executables"; - version = "11.0.0"; - - # https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog - src = fetchurl { - url = "http://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_Executables.pkg"; - sha256 = "0nvb1qx7l81l2wcl8wvgbpsg5rcn51ylhivqmlfr2hrrv3zrrpl0"; - }; - - installPhase = '' - mv Library/Developer/CommandLineTools $out - ''; - }; - - mkCc = cc: - if lib.versionAtLeast stdenv.hostPlatform.darwinSdkVersion "11" then cc - else - cc.override { - bintools = stdenv.cc.bintools.override { libc = packages.Libsystem; }; - libc = packages.Libsystem; - }; - - mkStdenv = stdenv: - if lib.versionAtLeast stdenv.hostPlatform.darwinSdkVersion "11" then stdenv - else - let - darwinMinVersion = "10.12"; - darwinSdkVersion = "11.0"; - in - (overrideCC stdenv (mkCc stdenv.cc)).override { - extraBuildInputs = [ pkgs.darwin.apple_sdk_11_0.frameworks.CoreFoundation ]; - buildPlatform = stdenv.buildPlatform // { inherit darwinMinVersion darwinSdkVersion; }; - hostPlatform = stdenv.hostPlatform // { inherit darwinMinVersion darwinSdkVersion; }; - targetPlatform = stdenv.targetPlatform // { inherit darwinMinVersion darwinSdkVersion; }; - }; - - stdenvs = { - stdenv = mkStdenv stdenv; - } // builtins.listToAttrs (map - (v: { - name = "llvmPackages_${v}"; - value = pkgs."llvmPackages_${v}" // { - stdenv = mkStdenv pkgs."llvmPackages_${v}".stdenv; - clang = mkCc pkgs."llvmPackages_${v}".clang; - }; - }) - [ "12" "13" "14" "15" "16" ] + callPackage = newScope ( + lib.optionalAttrs stdenv.isDarwin stdenvs // { inherit (pkgs.darwin.apple_sdk_11_0) rustPlatform; } ); - callPackage = newScope (packages // pkgs.darwin // { inherit MacOSX-SDK; }); - - packages = stdenvs // { - inherit (callPackage ./apple_sdk.nix { }) frameworks libs; - - # TODO: this is nice to be private. is it worth the callPackage above? - # Probably, I don't think that callPackage costs much at all. - inherit MacOSX-SDK CLTools_Executables; - - Libsystem = callPackage ./libSystem.nix { }; - LibsystemCross = pkgs.darwin.Libsystem; - libcharset = callPackage ./libcharset.nix { }; - libcompression = callPackage ./libcompression.nix { }; - libunwind = callPackage ./libunwind.nix { }; - libnetwork = callPackage ./libnetwork.nix { }; - libpm = callPackage ./libpm.nix { }; - # Avoid introducing a new objc4 if stdenv already has one, to prevent - # conflicting LLVM modules. - objc4 = stdenv.objc4 or (callPackage ./libobjc.nix { }); - - sdkRoot = pkgs.callPackage ../apple-sdk/sdkRoot.nix { sdkVersion = "11.0"; }; - - # questionable aliases - configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration; - inherit (pkgs.darwin.apple_sdk.frameworks) IOKit; - - xcodebuild = pkgs.xcbuild.override { - inherit (pkgs.darwin.apple_sdk_11_0) stdenv; - inherit (pkgs.darwin.apple_sdk_11_0.frameworks) CoreServices CoreGraphics ImageIO; - }; - - rustPlatform = pkgs.makeRustPlatform { + rustPlatform = + pkgs.makeRustPlatform { inherit (pkgs.darwin.apple_sdk_11_0) stdenv; inherit (pkgs) rustc cargo; - } // { - inherit (pkgs.callPackage ../../../build-support/rust/hooks { - inherit (pkgs.darwin.apple_sdk_11_0) stdenv; - inherit (pkgs) cargo rustc; - clang = mkCc pkgs.clang; - }) bindgenHook; + } + // { + inherit + (pkgs.callPackage ../../../build-support/rust/hooks { + inherit (pkgs.darwin.apple_sdk_11_0) stdenv; + inherit (pkgs) cargo rustc; + }) + bindgenHook + ; }; - callPackage = newScope (lib.optionalAttrs stdenv.hostPlatform.isDarwin (stdenvs // rec { - inherit (pkgs.darwin.apple_sdk_11_0) xcodebuild rustPlatform; - darwin = pkgs.darwin.overrideScope (_: prev: { - inherit (prev.darwin.apple_sdk_11_0) - IOKit - Libsystem - LibsystemCross - Security - configd - libcharset - libunwind - objc4 - ; - apple_sdk = prev.darwin.apple_sdk_11_0; - CF = prev.darwin.apple_sdk_11_0.CoreFoundation; - }); - xcbuild = xcodebuild; - })); + stdenv = overrideSDK stdenv "11.0"; - darwin-stubs = stdenvNoCC.mkDerivation { - pname = "darwin-stubs"; - inherit (MacOSX-SDK) version; + xcodebuild = pkgs.xcodebuild; - buildCommand = '' - mkdir -p "$out" - ln -s ${MacOSX-SDK}/System "$out/System" - ln -s ${MacOSX-SDK}/usr "$out/usr" - ''; - }; - }; -in packages + version = "11.0"; +} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix deleted file mode 100644 index fa6945f76718f..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix +++ /dev/null @@ -1,196 +0,0 @@ -# This file is generated by gen-frameworks.nix. -# Do not edit, put overrides in apple_sdk.nix instead. -{ libs, frameworks }: with libs; with frameworks; -{ - AGL = { inherit Carbon OpenGL; }; - AVFoundation = { inherit AudioToolbox CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; - AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; - Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; - Accessibility = { inherit CoreGraphics Foundation; }; - Accounts = { inherit Foundation; }; - AdServices = { inherit Foundation; }; - AdSupport = { inherit Foundation; }; - AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; - AppKit = { inherit ApplicationServices CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal OpenGL QuartzCore; }; - AppTrackingTransparency = { inherit Foundation; }; - AppleScriptKit = {}; - AppleScriptObjC = { inherit Foundation; }; - ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText ImageIO; }; - AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; - AudioUnit = { inherit AudioToolbox; }; - AudioVideoBridging = { inherit Foundation IOKit; }; - AuthenticationServices = { inherit AppKit Foundation; }; - AutomaticAssessmentConfiguration = { inherit Foundation; }; - Automator = { inherit AppKit Cocoa Foundation OSAKit; }; - BackgroundTasks = { inherit Foundation; }; - BusinessChat = { inherit Cocoa Foundation; }; - CFNetwork = { inherit CoreFoundation; }; - CalendarStore = {}; - CallKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; - ClassKit = { inherit CoreGraphics Foundation; }; - CloudKit = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; - Cocoa = { inherit AppKit CoreData Foundation; }; - Collaboration = { inherit AppKit CoreServices Foundation; }; - ColorSync = { inherit CoreFoundation; }; - Combine = {}; - Contacts = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - ContactsUI = { inherit AppKit; }; - CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; - CoreAudioKit = { inherit AppKit AudioUnit Cocoa Foundation; }; - CoreAudioTypes = { inherit CoreFoundation; }; - CoreBluetooth = { inherit Foundation; }; - CoreData = { inherit CloudKit Combine CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; - CoreDisplay = {}; - CoreFoundation = {}; - CoreGraphics = { inherit CoreFoundation IOKit; }; - CoreHaptics = { inherit Foundation; }; - CoreImage = { inherit ApplicationServices CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; - CoreLocation = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - CoreMIDI = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - CoreMIDIServer = {}; - CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; - CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; - CoreMediaIO = { inherit CoreFoundation CoreMedia; }; - CoreMotion = { inherit Foundation; }; - CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; - CoreSpotlight = { inherit Foundation UniformTypeIdentifiers; }; - CoreTelephony = {}; - CoreText = { inherit CoreFoundation CoreGraphics; }; - CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; - CoreWLAN = { inherit Foundation IOKit; }; - CryptoKit = { inherit CoreFoundation CoreGraphics Foundation IOKit LocalAuthentication Security; }; - CryptoTokenKit = { inherit CoreFoundation CoreGraphics Foundation IOKit Security; }; - DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; - DeveloperToolsSupport = { inherit Foundation; }; - DeviceCheck = { inherit Foundation; }; - DirectoryService = { inherit CoreFoundation; }; - DiscRecording = { inherit CoreServices Foundation; }; - DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; - DiskArbitration = { inherit CoreFoundation IOKit; }; - DriverKit = {}; - EventKit = { inherit CoreGraphics CoreLocation Foundation; }; - ExceptionHandling = { inherit Foundation; }; - ExecutionPolicy = { inherit Foundation; }; - ExternalAccessory = { inherit Foundation; }; - FWAUserLib = { inherit IOKit; }; - FileProvider = { inherit CoreGraphics Foundation; }; - FileProviderUI = { inherit AppKit FileProvider Foundation; }; - FinderSync = { inherit AppKit Foundation; }; - ForceFeedback = { inherit CoreFoundation IOKit; }; - Foundation = { inherit ApplicationServices Combine CoreFoundation CoreGraphics CoreServices IOKit Security; }; - GLKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; - GLUT = { inherit OpenGL; }; - GSS = { inherit CoreFoundation; }; - GameController = { inherit AppKit Foundation IOKit; }; - GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; - GameplayKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; - HIDDriverKit = { inherit IOKit USBDriverKit; }; - Hypervisor = {}; - ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; - IMServicePlugIn = { inherit Foundation; }; - IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; - IOBluetoothUI = { inherit Cocoa IOBluetooth; }; - IOKit = { inherit CoreFoundation; }; - IOSurface = { inherit CoreFoundation Foundation IOKit; }; - IOUSBHost = { inherit Foundation IOKit; }; - IdentityLookup = { inherit Foundation; }; - ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; - ImageIO = { inherit CoreFoundation CoreGraphics; }; - InputMethodKit = { inherit Carbon Cocoa Foundation; }; - InstallerPlugins = {}; - InstantMessage = {}; - Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; - JavaNativeFoundation = { inherit Foundation; }; - JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; - JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; - Kerberos = {}; - Kernel = {}; - KernelManagement = { inherit Foundation; }; - LDAP = {}; - LatentSemanticMapping = { inherit Carbon CoreFoundation; }; - LinkPresentation = { inherit AppKit Foundation; }; - LocalAuthentication = { inherit Foundation; }; - MLCompute = { inherit CoreFoundation CoreGraphics Foundation IOKit Metal; }; - MapKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; - MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText QuartzCore; }; - MediaLibrary = { inherit Foundation; }; - MediaPlayer = { inherit AVFoundation CoreGraphics Foundation; }; - MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; - Message = {}; - Metal = { inherit CoreFoundation CoreGraphics Foundation IOKit IOSurface; }; - MetalKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal ModelIO QuartzCore simd; }; - MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; - MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; - MetricKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; - MultipeerConnectivity = { inherit Cocoa Foundation; }; - NaturalLanguage = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - NearbyInteraction = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; - NetFS = { inherit CoreFoundation; }; - Network = { inherit CoreFoundation Foundation Security; }; - NetworkExtension = { inherit Foundation Network Security; }; - NetworkingDriverKit = {}; - NotificationCenter = { inherit AppKit Foundation; }; - OSAKit = { inherit Carbon Cocoa; }; - OSLog = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - OpenAL = {}; - OpenCL = { inherit OpenGL; }; - OpenDirectory = { inherit CoreFoundation Foundation; }; - OpenGL = {}; - PCIDriverKit = { inherit IOKit; }; - PCSC = {}; - PDFKit = { inherit AppKit Cocoa; }; - ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; - PassKit = { inherit AppKit Contacts CoreGraphics Foundation; }; - PencilKit = { inherit AppKit CloudKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; - Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; - PhotosUI = { inherit AppKit Foundation MapKit Photos; }; - PreferencePanes = { inherit Cocoa; }; - PushKit = { inherit Foundation; }; - Python = { inherit Carbon; }; - QTKit = {}; - Quartz = { inherit AppKit ApplicationServices Cocoa Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLook; }; - QuartzCore = { inherit CoreFoundation CoreGraphics CoreImage CoreVideo Foundation IOKit Metal OpenGL; }; - QuickLook = { inherit ApplicationServices CoreFoundation; }; - QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; - RealityKit = { inherit AVFoundation AppKit AudioToolbox CloudKit Combine CoreAudio CoreData CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreText Foundation IOKit Metal MultipeerConnectivity QuartzCore simd; }; - ReplayKit = { inherit AVFoundation AppKit Foundation; }; - Ruby = {}; - SafariServices = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; - SceneKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; - ScreenSaver = { inherit AppKit Foundation; }; - ScreenTime = { inherit AppKit Foundation; }; - ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; - Security = { inherit CoreFoundation; }; - SecurityFoundation = { inherit Foundation Security; }; - SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; - SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; - ServiceManagement = { inherit CoreFoundation Security; }; - Social = { inherit AppKit Foundation; }; - SoundAnalysis = { inherit AVFoundation CoreML CoreMedia Foundation; }; - Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; - SpriteKit = { inherit AppKit CloudKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; - StoreKit = { inherit AppKit CoreGraphics Foundation; }; - SwiftUI = { inherit AppKit CloudKit Combine CoreData CoreFoundation CoreGraphics CoreImage CoreLocation DeveloperToolsSupport Foundation IOKit Metal QuartzCore UniformTypeIdentifiers; }; - SyncServices = {}; - System = {}; - SystemConfiguration = { inherit CoreFoundation Security; }; - SystemExtensions = { inherit Foundation; }; - TWAIN = {}; - Tcl = {}; - Tk = {}; - USBDriverKit = { inherit IOKit; }; - UniformTypeIdentifiers = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - UserNotifications = { inherit Foundation; }; - UserNotificationsUI = { inherit AppKit; }; - VideoDecodeAcceleration = {}; - VideoSubscriberAccount = { inherit Foundation; }; - VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; - Virtualization = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; - WebKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit JavaScriptCore Metal OpenGL QuartzCore; }; - WidgetKit = { inherit Combine CoreFoundation CoreGraphics CoreVideo Foundation IOKit Intents Metal SwiftUI; }; - iTunesLibrary = { inherit Foundation; }; - vmnet = {}; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix deleted file mode 100644 index b661da75febe6..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -stdenvNoCC.mkDerivation { - pname = "libSystem"; - version = MacOSX-SDK.version; - - dontBuild = true; - dontUnpack = true; - - nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ]; - - includeDirs = [ - "CommonCrypto" "_types" "architecture" "arpa" "atm" "bank" "bsd" "bsm" - "corecrypto" "corpses" "default_pager" "device" "dispatch" "hfs" "i386" - "iokit" "kern" "libkern" "mach" "mach-o" "mach_debug" "machine" "malloc" - "miscfs" "net" "netinet" "netinet6" "netkey" "nfs" "os" "osfmk" "pexpert" - "platform" "protocols" "pthread" "rpc" "rpcsvc" "secure" "security" - "servers" "sys" "uuid" "vfs" "voucher" "xlocale" - ] ++ [ - "arm" "xpc" "arm64" - ]; - - csu = [ - "bundle1.o" "crt0.o" "crt1.10.5.o" "crt1.10.6.o" "crt1.o" "dylib1.10.5.o" - "dylib1.o" "gcrt1.o" "lazydylib1.o" - ]; - - installPhase = '' - mkdir -p $out/{include,lib/swift} - - for dir in $includeDirs; do - from=${MacOSX-SDK}/usr/include/$dir - if [ -e "$from" ]; then - cp -dr $from $out/include - else - echo "Header directory '$from' doesn't exist: skipping" - fi - done - - cp -d \ - ${MacOSX-SDK}/usr/include/*.h \ - ${MacOSX-SDK}/usr/include/*.modulemap \ - ${MacOSX-SDK}/usr/include/*.apinotes \ - $out/include - - rm $out/include/tk*.h $out/include/tcl*.h - - cp -dr \ - ${MacOSX-SDK}/usr/lib/libSystem.* \ - ${MacOSX-SDK}/usr/lib/system \ - $out/lib - - # Extra libraries - for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.1 resolv; do - cp -d \ - ${MacOSX-SDK}/usr/lib/lib$name.tbd \ - ${MacOSX-SDK}/usr/lib/lib$name.*.tbd \ - $out/lib - done - - for name in os Dispatch; do - cp -dr \ - ${MacOSX-SDK}/usr/lib/swift/$name.swiftmodule \ - ${MacOSX-SDK}/usr/lib/swift/libswift$name.tbd \ - $out/lib/swift - done - - for f in $csu; do - from=${MacOSX-SDK}/usr/lib/$f - if [ -e "$from" ]; then - cp -d $from $out/lib - else - echo "Csu file '$from' doesn't exist: skipping" - fi - done - - chmod u+w -R $out/lib - find $out -name '*.tbd' -type f | while read tbd; do - rewrite-tbd \ - -c /usr/lib/libsystem.dylib:$out/lib/libsystem.dylib \ - -p /usr/lib/system/:$out/lib/system/ \ - -p /usr/lib/swift/:$out/lib/swift/ \ - -r ${builtins.storeDir} \ - "$tbd" - done - ''; -} - diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix deleted file mode 100644 index bf55037ab6057..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -stdenvNoCC.mkDerivation { - pname = "libcharset"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ]; - - installPhase = '' - mkdir -p $out/{include,lib} - cp ${MacOSX-SDK}/usr/lib/libcharset* $out/lib - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libcompression.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libcompression.nix deleted file mode 100644 index 92a45b7c5a50c..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libcompression.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -let self = stdenvNoCC.mkDerivation { - pname = "libcompression"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/lib - cp ${MacOSX-SDK}/usr/lib/libcompression* $out/lib - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libcompression.dylib" = "${self}/lib/libcompression.dylib"; - }; - }; -}; in self diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix deleted file mode 100644 index 2e5c0593bf406..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -let self = stdenvNoCC.mkDerivation { - pname = "libnetwork"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/lib - cp ${MacOSX-SDK}/usr/lib/libnetwork* $out/lib - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libnetwork.dylib" = "${self}/lib/libnetwork.dylib"; - }; - }; -}; in self diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix deleted file mode 100644 index 9288097ef3699..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenvNoCC, MacOSX-SDK, libcharset }: - -let self = stdenvNoCC.mkDerivation { - pname = "libobjc"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/{include,lib/swift} - cp -r ${MacOSX-SDK}/usr/include/objc $out/include - cp ${MacOSX-SDK}/usr/lib/libobjc* $out/lib - cp -r ${MacOSX-SDK}/usr/lib/swift/ObjectiveC.swiftmodule $out/lib/swift - cp ${MacOSX-SDK}/usr/lib/swift/libswiftObjectiveC.tbd $out/lib/swift - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib"; - const."/usr/lib/swift/libswiftObjectiveC.dylib" = "${self}/lib/swift/libswiftObjectiveC.dylib"; - }; - }; -}; in self diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix deleted file mode 100644 index 995f2b20ce706..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenvNoCC, MacOSX-SDK, checkReexportsHook }: - -stdenvNoCC.mkDerivation { - pname = "libpm"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - nativeBuildInputs = [ checkReexportsHook ]; - - installPhase = '' - mkdir -p $out/lib - cp ${MacOSX-SDK}/usr/lib/libpm* $out/lib - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libpmenergy.dylib" = "${placeholder "out"}/lib/libpmenergy.dylib"; - const."/usr/lib/libpmsample.dylib" = "${placeholder "out"}/lib/libpmsample.dylib"; - }; - }; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix deleted file mode 100644 index 885780eba75cd..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -stdenvNoCC.mkDerivation { - pname = "libunwind"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ]; - - installPhase = '' - mkdir -p $out/include/mach-o - - cp \ - ${MacOSX-SDK}/usr/include/libunwind.h \ - ${MacOSX-SDK}/usr/include/unwind.h \ - $out/include - - cp \ - ${MacOSX-SDK}/usr/include/mach-o/compact_unwind_encoding.h \ - $out/include/mach-o - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix deleted file mode 100644 index 4566c8af84f52..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ frameworks, libobjc }: with frameworks; -# generated by hand to avoid exposing all private frameworks -# frameworks here are only the necessary ones used by public frameworks. -{ - Apple80211 = {}; - AVFCapture = {}; - AVFCore = {}; - AddressBookCore = { inherit ContactsPersistence; }; - AudioToolboxCore = {}; - ContactsPersistence = {}; - GameCenterFoundation = {}; - GameCenterUI = {}; - GameCenterUICore = {}; - MediaRemote = {}; - PassKitCore = {}; - SignpostMetrics = {}; - SkyLight = {}; - UIFoundation = {}; - URLFormatting = {}; - - # Also expose CoreSymbolication; used by `root` package. - CoreSymbolication = {}; - - # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. - DebugSymbols = {}; - - # Also expose DisplayServices; used by `sketchybar` package. - DisplayServices = { inherit libobjc; }; - - # Also expose MultitouchSupport; used by `chuck` package. - MultitouchSupport = {}; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_Executables.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_Executables.nix deleted file mode 100644 index f3ff413d0cae3..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_Executables.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - stdenvNoCC, - fetchurl, - cpio, - pbzx, - version, -}: - -let - releases = builtins.fromJSON (builtins.readFile ./apple-sdk-releases.json); -in -stdenvNoCC.mkDerivation (finalAttrs: { - pname = "CLTools_Executables"; - inherit version; - - src = fetchurl releases.${version}.${finalAttrs.pname}; - - nativeBuildInputs = [ - cpio - pbzx - ]; - - buildCommand = '' - pbzx $src | cpio -idm - mv Library/Developer/CommandLineTools $out - ''; -}) diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_macOSNMOS_SDK.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_macOSNMOS_SDK.nix deleted file mode 100644 index 7af2c48cc0819..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_macOSNMOS_SDK.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - lib, - stdenvNoCC, - fetchurl, - cpio, - pbzx, - version, -}: - -let - releases = builtins.fromJSON (builtins.readFile ./apple-sdk-releases.json); -in -stdenvNoCC.mkDerivation (finalAttrs: { - pname = "CLTools_macOSNMOS_SDK"; - inherit version; - - src = fetchurl releases.${version}.${finalAttrs.pname}; - - nativeBuildInputs = [ - cpio - pbzx - ]; - - buildCommand = '' - pbzx $src | cpio -idm - mv Library/Developer/CommandLineTools/SDKs/MacOSX${lib.versions.majorMinor version}.sdk $out - ''; -}) diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/apple-sdk-releases.json b/pkgs/os-specific/darwin/apple-sdk-12.3/apple-sdk-releases.json deleted file mode 100644 index 87e01f0039ce2..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/apple-sdk-releases.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "12.3": { - "CLTools_Executables": { - "hash": "sha256-XlxHwCq+rtBF3Yyfdob3UEHN7YKzb7JF84lRmZbB/50=", - "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_Executables.pkg" - }, - "CLTools_macOSLMOS_SDK": { - "hash": "sha256-mY9YTlyTujV6R89WaNmkJrfOQatXnoSW8gKxnawQz5Q=", - "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOSLMOS_SDK.pkg" - }, - "CLTools_macOSNMOS_SDK": { - "hash": "sha256-Tr9VCeCP5udmh09U/zPQG2c4ky1LXscBwPfgpRy8uds=", - "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOSNMOS_SDK.pkg" - }, - "CLTools_macOS_SDK": { - "hash": "sha256-2xwYLfiYuEdck7/8NY3iqiPKvoG9HAjXt8Ewyp9c0Es=", - "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOS_SDK.pkg" - } - } -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/default.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/default.nix index 85444ec95e614..468465b192772 100644 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk-12.3/default.nix @@ -1,49 +1,266 @@ +# Compatibility stubs for packages that used the old SDK frameworks. +# TODO(@reckenrode) Make these stubs warn after framework usage has been cleaned up in nixpkgs. { lib, + callPackage, newScope, - overrideCC, + overrideSDK, pkgs, stdenv, stdenvNoCC, }: let - version = "12.3"; - - MacOSX-SDK = callPackage ./CLTools_macOSNMOS_SDK.nix { inherit version; }; - callPackage = newScope (pkgs.darwin // packages); - - packages = { - # Make sure we pass our special `callPackage` instead of using packages.callPackage which - # does not have necessary attributes in scope. - frameworks = callPackage ./frameworks { inherit callPackage; }; - libs = callPackage ./libs { inherit callPackage; }; - - CLTools_Executables = callPackage ./CLTools_Executables.nix { inherit version; }; - Libsystem = callPackage ./libSystem.nix { }; - LibsystemCross = callPackage ./libSystem.nix { }; - libunwind = callPackage ./libunwind.nix { }; - libnetwork = callPackage ./libnetwork.nix { }; - libpm = callPackage ./libpm.nix { }; - # Avoid introducing a new objc4 if stdenv already has one, to prevent - # conflicting LLVM modules. - objc4 = stdenv.objc4 or (callPackage ./libobjc.nix { }); - - darwin-stubs = stdenvNoCC.mkDerivation { - pname = "darwin-stubs"; - inherit (MacOSX-SDK) version; - - preferLocalBuild = true; - allowSubstitutes = false; + mkStub = callPackage ../apple-sdk/mk-stub.nix { } "12.3"; +in +lib.genAttrs [ + "CLTools_Executables" + "Libsystem" + "LibsystemCross" + "darwin-stubs" + "libnetwork" + "libpm" + "libunwind" + "objc4" + "sdkRoot" +] mkStub +// { + frameworks = lib.genAttrs [ + "AGL" + "AVFAudio" + "AVFCapture" + "AVFCore" + "AVFoundation" + "AVKit" + "Accelerate" + "Accessibility" + "Accounts" + "AdServices" + "AdSupport" + "AddressBook" + "AddressBookCore" + "AppKit" + "AppTrackingTransparency" + "AppleScriptKit" + "AppleScriptObjC" + "ApplicationServices" + "AudioToolbox" + "AudioToolboxCore" + "AudioUnit" + "AudioVideoBridging" + "AuthenticationServices" + "AutomaticAssessmentConfiguration" + "Automator" + "BackgroundTasks" + "BusinessChat" + "CFNetwork" + "CHIP" + "CalendarStore" + "CallKit" + "Carbon" + "ClassKit" + "CloudKit" + "Cocoa" + "Collaboration" + "ColorSync" + "Combine" + "Contacts" + "ContactsPersistence" + "ContactsUI" + "CoreAudio" + "CoreAudioKit" + "CoreAudioTypes" + "CoreBluetooth" + "CoreData" + "CoreDisplay" + "CoreFoundation" + "CoreGraphics" + "CoreHaptics" + "CoreImage" + "CoreLocation" + "CoreMIDI" + "CoreMIDIServer" + "CoreML" + "CoreMedia" + "CoreMediaIO" + "CoreMotion" + "CoreServices" + "CoreSpotlight" + "CoreSymbolication" + "CoreTelephony" + "CoreText" + "CoreVideo" + "CoreWLAN" + "CreateML" + "CryptoKit" + "CryptoTokenKit" + "DVDPlayback" + "DataDetection" + "DebugSymbols" + "DeveloperToolsSupport" + "DeviceActivity" + "DeviceCheck" + "DirectoryService" + "DiscRecording" + "DiscRecordingUI" + "DiskArbitration" + "DisplayServices" + "DriverKit" + "EventKit" + "ExceptionHandling" + "ExecutionPolicy" + "ExposureNotification" + "ExternalAccessory" + "FWAUserLib" + "FileProvider" + "FileProviderUI" + "FinderSync" + "ForceFeedback" + "Foundation" + "GLKit" + "GLUT" + "GSS" + "GameCenterFoundation" + "GameCenterUI" + "GameCenterUICore" + "GameController" + "GameKit" + "GameplayKit" + "GroupActivities" + "Hypervisor" + "ICADevices" + "IMServicePlugIn" + "IOBluetooth" + "IOBluetoothUI" + "IOKit" + "IOSurface" + "IOUSBHost" + "IdentityLookup" + "ImageCaptureCore" + "ImageIO" + "InputMethodKit" + "InstallerPlugins" + "InstantMessage" + "Intents" + "IntentsUI" + "JavaNativeFoundation" + "JavaRuntimeSupport" + "JavaScriptCore" + "JavaVM" + "Kerberos" + "Kernel" + "KernelManagement" + "LDAP" + "LatentSemanticMapping" + "LinkPresentation" + "LocalAuthentication" + "LocalAuthenticationEmbeddedUI" + "MLCompute" + "MailKit" + "ManagedSettings" + "MapKit" + "MediaAccessibility" + "MediaLibrary" + "MediaPlayer" + "MediaToolbox" + "Message" + "Metal" + "MetalKit" + "MetalPerformanceShaders" + "MetalPerformanceShadersGraph" + "MetricKit" + "ModelIO" + "MultipeerConnectivity" + "MultitouchSupport" + "MusicKit" + "NaturalLanguage" + "NearbyInteraction" + "NetFS" + "Network" + "NetworkExtension" + "NotificationCenter" + "OSAKit" + "OSLog" + "OpenAL" + "OpenCL" + "OpenDirectory" + "OpenGL" + "PCSC" + "PDFKit" + "PHASE" + "ParavirtualizedGraphics" + "PassKit" + "PassKitCore" + "PencilKit" + "Photos" + "PhotosUI" + "PreferencePanes" + "PushKit" + "QTKit" + "Quartz" + "QuartzCore" + "QuickLook" + "QuickLookThumbnailing" + "QuickLookUI" + "QuickTime" + "RealityFoundation" + "RealityKit" + "ReplayKit" + "Ruby" + "SafariServices" + "SceneKit" + "ScreenCaptureKit" + "ScreenSaver" + "ScreenTime" + "ScriptingBridge" + "Security" + "SecurityFoundation" + "SecurityInterface" + "SensorKit" + "ServiceManagement" + "ShazamKit" + "SignpostMetrics" + "SkyLight" + "Social" + "SoundAnalysis" + "Speech" + "SpriteKit" + "StoreKit" + "SwiftUI" + "SyncServices" + "System" + "SystemConfiguration" + "SystemExtensions" + "TWAIN" + "TabularData" + "Tcl" + "Tk" + "UIFoundation" + "URLFormatting" + "UniformTypeIdentifiers" + "UserNotifications" + "UserNotificationsUI" + "VideoDecodeAcceleration" + "VideoSubscriberAccount" + "VideoToolbox" + "Virtualization" + "Vision" + "WebKit" + "WidgetKit" + "iTunesLibrary" + "vmnet" + ] mkStub; - buildCommand = '' - mkdir -p "$out" - ln -s ${MacOSX-SDK}/System "$out/System" - ln -s ${MacOSX-SDK}/usr "$out/usr" - ''; - }; + libs = lib.genAttrs [ + "Xplugin" + "utmp" + "libDER" + "xpc" + "sandbox" + "simd" + "utmp" + "xpc" + ] mkStub; - sdkRoot = pkgs.callPackage ../apple-sdk/sdkRoot.nix { sdkVersion = version; }; - }; -in -packages + version = "12.3"; +} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/default.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/default.nix deleted file mode 100644 index 8ae0cd649c93c..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/default.nix +++ /dev/null @@ -1,146 +0,0 @@ -{ - lib, - stdenvNoCC, - buildPackages, - # macOS things - callPackage, - darwin-stubs, -}: - -let - inherit (darwin-stubs) version; - fixup-frameworks = callPackage ./fixups.nix { }; - private-frameworks = callPackage ./private.nix { }; - public-frameworks = callPackage ./public.nix { }; - - mkDepsRewrites = - deps: - let - mergeRewrites = x: y: { - prefix = lib.mergeAttrs (x.prefix or { }) (y.prefix or { }); - const = lib.mergeAttrs (x.const or { }) (y.const or { }); - }; - - rewriteArgs = - { - prefix ? { }, - const ? { }, - }: - lib.concatLists ( - (lib.mapAttrsToList (from: to: [ - "-p" - "${from}:${to}" - ]) prefix) - ++ (lib.mapAttrsToList (from: to: [ - "-c" - "${from}:${to}" - ]) const) - ); - - rewrites = - depList: - lib.fold mergeRewrites { } ( - map (dep: dep.tbdRewrites) (lib.filter (dep: dep ? tbdRewrites) depList) - ); - in - lib.escapeShellArgs (rewriteArgs (rewrites (lib.attrValues deps))); - - mkFramework = - { - name, - deps, - private ? false, - }: - let - standardFrameworkPath = - name: private: - "/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework"; - - self = stdenvNoCC.mkDerivation { - pname = "apple-${lib.optionalString private "private-"}framework-${name}"; - inherit (darwin-stubs) version; - - # because we copy files from the system - preferLocalBuild = true; - - dontUnpack = true; - dontBuild = true; - - disallowedRequisites = [ darwin-stubs ]; - - nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ]; - - installPhase = '' - mkdir -p $out/Library/Frameworks - - cp -r ${darwin-stubs}${standardFrameworkPath name private} $out/Library/Frameworks - - if [[ -d ${darwin-stubs}/usr/lib/swift/${name}.swiftmodule ]]; then - mkdir -p $out/lib/swift - cp -r -t $out/lib/swift \ - ${darwin-stubs}/usr/lib/swift/${name}.swiftmodule \ - ${darwin-stubs}/usr/lib/swift/libswift${name}.tbd - fi - - # Fix and check tbd re-export references - chmod u+w -R $out - find $out -name '*.tbd' -type f | while IFS=$'\n' read tbd; do - echo "Fixing re-exports in $tbd" - rewrite-tbd \ - -p ${standardFrameworkPath name private}/:$out/Library/Frameworks/${name}.framework/ \ - -p /usr/lib/swift/:$out/lib/swift/ \ - ${mkDepsRewrites deps} \ - -r ${builtins.storeDir} \ - "$tbd" - done - ''; - - propagatedBuildInputs = lib.attrValues deps; - - passthru.tbdRewrites.prefix."${standardFrameworkPath name private}/" = "${self}/Library/Frameworks/${name}.framework/"; - - meta = with lib; { - description = "Apple SDK framework ${name}"; - maintainers = [ ]; - platforms = platforms.darwin; - }; - }; - in - self; - - # Helper functions for creating framework derivations. - framework = - name: deps: - mkFramework { - inherit name deps; - private = false; - }; - - # Helper functions for creating private framework derivations. - privateFramework = - name: deps: - mkFramework { - inherit name deps; - private = true; - }; - - # Merge addToFrameworks into public-frameworks and remove elements of removeFromFrameworks. - deps = - let - inherit (fixup-frameworks) addToFrameworks removeFromFrameworks; - fixupDeps = - name: deps: - lib.pipe deps [ - # Add dependencies from addToFrameworks. - (deps: lib.recursiveUpdate deps (addToFrameworks.${name} or { })) - # Keep dependencies not in removeFromFrameworks. - (lib.filterAttrs (depName: _: !(removeFromFrameworks.${name}.${depName} or false))) - ]; - in - lib.mapAttrs fixupDeps public-frameworks; - - # Create derivations and add private frameworks. - bareFrameworks = - (lib.mapAttrs framework deps) // (lib.mapAttrs privateFramework private-frameworks); -in -bareFrameworks // fixup-frameworks.overrideFrameworks bareFrameworks diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/fixups.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/fixups.nix deleted file mode 100644 index 6068395c4ae2e..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/fixups.nix +++ /dev/null @@ -1,163 +0,0 @@ -{ - lib, - # macOS things - frameworks, - libnetwork, - libs, - darwin-stubs, - objc4, -}: - -{ - # Used to add dependencies which are not picked up by gen-frameworks.py. - # Some of these are simply private frameworks the generator does not see. - # Trial and error, building things and adding dependencies when they fail. - addToFrameworks = - let - inherit (libs) libDER; - libobjc = objc4; - in - with frameworks; - { - # Below this comment are entries migrated from before the generator was - # added. If, for a given framework, you are able to reverify the extra - # deps are really necessary on top of the generator deps, move it above - # this comment (and maybe document your findings). - AVFoundation = { - inherit ApplicationServices AVFCapture AVFCore; - }; - Accelerate = { - inherit CoreWLAN IOBluetooth; - }; - AddressBook = { - inherit AddressBookCore ContactsPersistence libobjc; - }; - AppKit = { - inherit AudioToolbox AudioUnit UIFoundation; - }; - AudioToolbox = { - inherit AudioToolboxCore; - }; - AudioUnit = { - inherit Carbon CoreAudio; - }; - Carbon = { - inherit IOKit QuartzCore libobjc; - }; - CoreAudio = { - inherit IOKit; - }; - CoreData = { - inherit CloudKit; - }; - CoreFoundation = { - inherit libobjc; - }; - CoreGraphics = { - inherit SystemConfiguration; - }; - CoreMIDIServer = { - inherit CoreMIDI; - }; - CoreMedia = { - inherit ApplicationServices AudioToolbox AudioUnit; - }; - CoreServices = { - inherit CoreAudio NetFS ServiceManagement; - }; - CoreWLAN = { - inherit SecurityFoundation; - }; - DiscRecording = { - inherit IOKit libobjc; - }; - Foundation = { - inherit SystemConfiguration libobjc; - }; - GameKit = { - inherit - GameCenterFoundation - GameCenterUI - GameCenterUICore - ReplayKit - ; - }; - ICADevices = { - inherit Carbon libobjc; - }; - IOBluetooth = { - inherit CoreBluetooth; - }; - JavaScriptCore = { - inherit libobjc; - }; - Kernel = { - inherit IOKit; - }; - LinkPresentation = { - inherit URLFormatting; - }; - MediaToolbox = { - inherit AudioUnit; - }; - MetricKit = { - inherit SignpostMetrics; - }; - Network = { - inherit libnetwork; - }; - PCSC = { - inherit CoreData; - }; - PassKit = { - inherit PassKitCore; - }; - QTKit = { - inherit - CoreMedia - CoreMediaIO - MediaToolbox - VideoToolbox - ; - }; - Quartz = { - inherit QTKit; - }; - QuartzCore = { - inherit - ApplicationServices - CoreImage - CoreVideo - Metal - OpenCL - libobjc - ; - }; - Security = { - inherit IOKit libDER; - }; - TWAIN = { - inherit Carbon; - }; - VideoDecodeAcceleration = { - inherit CoreVideo; - }; - WebKit = { - inherit ApplicationServices Carbon libobjc; - }; - }; - - # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break - # cyclic dependencies. - removeFromFrameworks = { }; - - # Overrides for framework derivations. - overrideFrameworks = super: { - # This framework doesn't exist in newer SDKs (somewhere around 10.13), but - # there are references to it in nixpkgs. - QuickTime = throw "QuickTime framework not available"; - - # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 - JavaVM = super.JavaNativeFoundation; - }; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/private.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/private.nix deleted file mode 100644 index d58b28fa02715..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/private.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ objc4, frameworks }: - -# generated by hand to avoid exposing all private frameworks -# frameworks here are only the necessary ones used by public frameworks. -{ - AVFCapture = { }; - AVFCore = { }; - AddressBookCore = { - inherit (frameworks) ContactsPersistence; - }; - AudioToolboxCore = { }; - ContactsPersistence = { }; - UIFoundation = { }; - GameCenterFoundation = { }; - GameCenterUI = { }; - GameCenterUICore = { }; - URLFormatting = { }; - SignpostMetrics = { }; - PassKitCore = { }; - SkyLight = { }; - - # Also expose CoreSymbolication; used by `root` package. - CoreSymbolication = { }; - - # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. - DebugSymbols = { }; - - # Also expose DisplayServices; used by `sketchybar` package. - DisplayServices = { - libobjc = objc4; - }; - - # Also expose MultitouchSupport; used by `chuck` package. - MultitouchSupport = { }; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/public.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/public.nix deleted file mode 100644 index 4488c84bf1245..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/frameworks/public.nix +++ /dev/null @@ -1,209 +0,0 @@ -# This file is generated by gen-frameworks.nix. -# Do not edit, put overrides in apple_sdk.nix instead. -{ libs, frameworks }: with libs; with frameworks; -{ - AGL = { inherit Carbon OpenGL; }; - AVFAudio = { inherit AudioToolbox CoreAudioTypes CoreMIDI CoreMedia Foundation; }; - AVFoundation = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; - AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; - Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; - Accessibility = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - Accounts = { inherit Foundation; }; - AdServices = { inherit Foundation; }; - AdSupport = { inherit Foundation; }; - AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; - AppKit = { inherit Accessibility ApplicationServices CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal OpenGL QuartzCore; }; - AppTrackingTransparency = { inherit Foundation; }; - AppleScriptKit = {}; - AppleScriptObjC = { inherit Foundation; }; - ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText ImageIO; }; - AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; - AudioUnit = { inherit AudioToolbox; }; - AudioVideoBridging = { inherit Foundation IOKit; }; - AuthenticationServices = { inherit AppKit Foundation; }; - AutomaticAssessmentConfiguration = { inherit Foundation; }; - Automator = { inherit AppKit Cocoa Foundation OSAKit; }; - BackgroundTasks = { inherit Foundation; }; - BusinessChat = { inherit Cocoa Foundation; }; - CFNetwork = { inherit CoreFoundation; }; - CHIP = { inherit Foundation Security; }; - CalendarStore = {}; - CallKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; - ClassKit = { inherit CoreGraphics Foundation; }; - CloudKit = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; - Cocoa = { inherit AppKit CoreData Foundation; }; - Collaboration = { inherit AppKit CoreServices Foundation; }; - ColorSync = { inherit CoreFoundation; }; - Combine = {}; - Contacts = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - ContactsUI = { inherit AppKit; }; - CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; - CoreAudioKit = { inherit AppKit AudioUnit Cocoa Foundation; }; - CoreAudioTypes = { inherit CoreFoundation; }; - CoreBluetooth = { inherit Foundation; }; - CoreData = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit; }; - CoreDisplay = {}; - CoreFoundation = {}; - CoreGraphics = { inherit CoreFoundation IOKit; }; - CoreHaptics = { inherit Foundation; }; - CoreImage = { inherit ApplicationServices CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; - CoreLocation = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - CoreMIDI = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - CoreMIDIServer = {}; - CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; - CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; - CoreMediaIO = { inherit CoreAudio CoreFoundation CoreGraphics CoreMedia Foundation IOKit Metal; }; - CoreMotion = { inherit Foundation; }; - CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; - CoreSpotlight = { inherit Foundation UniformTypeIdentifiers; }; - CoreTelephony = {}; - CoreText = { inherit CoreFoundation CoreGraphics; }; - CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; - CoreWLAN = { inherit Foundation IOKit; }; - CreateML = { inherit AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreML CoreMedia CoreServices CoreVideo Foundation IOKit ImageIO Metal MetalPerformanceShaders NaturalLanguage TabularData VideoToolbox Vision simd; }; - CryptoKit = { inherit CoreFoundation CoreGraphics Foundation IOKit LocalAuthentication Security; }; - CryptoTokenKit = { inherit CoreFoundation CoreGraphics Foundation IOKit Security; }; - DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; - DataDetection = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - DeveloperToolsSupport = {}; - DeviceActivity = { inherit Foundation ManagedSettings; }; - DeviceCheck = { inherit Foundation; }; - DirectoryService = { inherit CoreFoundation; }; - DiscRecording = { inherit CoreServices Foundation; }; - DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; - DiskArbitration = { inherit CoreFoundation IOKit; }; - DriverKit = {}; - EventKit = { inherit CoreGraphics CoreLocation Foundation; }; - ExceptionHandling = { inherit Foundation; }; - ExecutionPolicy = { inherit Foundation; }; - ExposureNotification = { inherit Foundation; }; - ExternalAccessory = { inherit Foundation; }; - FWAUserLib = { inherit IOKit; }; - FileProvider = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - FileProviderUI = { inherit AppKit FileProvider Foundation; }; - FinderSync = { inherit AppKit Foundation; }; - ForceFeedback = { inherit CoreFoundation IOKit; }; - Foundation = { inherit Combine CoreFoundation CoreGraphics CoreServices IOKit Security; }; - GLKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; - GLUT = { inherit OpenGL; }; - GSS = { inherit CoreFoundation; }; - GameController = { inherit AppKit Foundation IOKit; }; - GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; - GameplayKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; - GroupActivities = { inherit AVFoundation Combine CoreGraphics CryptoKit Foundation Network UniformTypeIdentifiers; }; - Hypervisor = {}; - ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; - IMServicePlugIn = { inherit Foundation; }; - IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; - IOBluetoothUI = { inherit Cocoa IOBluetooth; }; - IOKit = { inherit CoreFoundation; }; - IOSurface = { inherit CoreFoundation Foundation IOKit; }; - IOUSBHost = { inherit Foundation IOKit; }; - IdentityLookup = { inherit Foundation; }; - ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; - ImageIO = { inherit CoreFoundation CoreGraphics; }; - InputMethodKit = { inherit Carbon Cocoa Foundation; }; - InstallerPlugins = {}; - InstantMessage = {}; - Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit UserNotifications; }; - IntentsUI = { inherit AppKit; }; - JavaNativeFoundation = { inherit Foundation; }; - JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; - JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; - Kerberos = {}; - Kernel = {}; - KernelManagement = { inherit Foundation; }; - LDAP = {}; - LatentSemanticMapping = { inherit Carbon CoreFoundation; }; - LinkPresentation = { inherit AppKit Foundation; }; - LocalAuthentication = { inherit Foundation; }; - LocalAuthenticationEmbeddedUI = { inherit AppKit Foundation LocalAuthentication; }; - MLCompute = { inherit CoreFoundation CoreGraphics Foundation IOKit Metal; }; - MailKit = { inherit AppKit Foundation; }; - ManagedSettings = { inherit Combine Foundation; }; - MapKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; - MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText; }; - MediaLibrary = { inherit Foundation; }; - MediaPlayer = { inherit AVFoundation CoreGraphics Foundation; }; - MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; - Message = {}; - Metal = { inherit CoreFoundation CoreGraphics Foundation IOKit IOSurface; }; - MetalKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO QuartzCore simd; }; - MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; - MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; - MetricKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; - MultipeerConnectivity = { inherit Cocoa Foundation; }; - MusicKit = { inherit Combine CoreGraphics Foundation; }; - NaturalLanguage = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - NearbyInteraction = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; - NetFS = { inherit CoreFoundation; }; - Network = { inherit CoreFoundation Foundation Security; }; - NetworkExtension = { inherit Foundation Network Security; }; - NotificationCenter = { inherit AppKit Foundation; }; - OSAKit = { inherit Carbon Cocoa; }; - OSLog = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - OpenAL = {}; - OpenCL = { inherit OpenGL; }; - OpenDirectory = { inherit CoreFoundation Foundation; }; - OpenGL = {}; - PCSC = {}; - PDFKit = { inherit AppKit Cocoa; }; - PHASE = { inherit AVFAudio AVFoundation CoreAudioTypes Foundation ModelIO simd; }; - ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; - PassKit = { inherit AppKit Contacts CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; - PencilKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; - Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; - PhotosUI = { inherit AppKit Foundation MapKit Photos; }; - PreferencePanes = { inherit Cocoa; }; - PushKit = { inherit Foundation; }; - QTKit = {}; - Quartz = { inherit AppKit ApplicationServices Cocoa Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLookUI; }; - QuartzCore = { inherit CoreFoundation CoreGraphics CoreImage CoreVideo Foundation IOKit Metal OpenGL; }; - QuickLook = { inherit ApplicationServices CoreFoundation; }; - QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; - QuickLookUI = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal PDFKit QuartzCore QuickLook UniformTypeIdentifiers; }; - RealityFoundation = { inherit AVFAudio AVFoundation AppKit AudioToolbox Combine CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreMotion CoreText CoreVideo Foundation IOKit Metal QuartzCore simd; }; - RealityKit = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal MultipeerConnectivity QuartzCore RealityFoundation simd; }; - ReplayKit = { inherit AVFoundation AppKit Foundation; }; - Ruby = {}; - SafariServices = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; - SceneKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; - ScreenCaptureKit = { inherit AppKit CoreGraphics CoreMedia Foundation; }; - ScreenSaver = { inherit AppKit Foundation; }; - ScreenTime = { inherit AppKit Foundation; }; - ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; - Security = { inherit CoreFoundation; }; - SecurityFoundation = { inherit Foundation Security; }; - SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; - SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; - ServiceManagement = { inherit CoreFoundation Security; }; - ShazamKit = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal MusicKit; }; - Social = { inherit AppKit Foundation; }; - SoundAnalysis = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreML CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; - Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; - SpriteKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; - StoreKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CryptoKit Foundation IOKit Metal QuartzCore Security; }; - SwiftUI = { inherit Accessibility AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage DeveloperToolsSupport Foundation IOKit Metal QuartzCore UniformTypeIdentifiers; }; - SyncServices = {}; - System = {}; - SystemConfiguration = { inherit CoreFoundation Security; }; - SystemExtensions = { inherit Foundation; }; - TWAIN = {}; - TabularData = { inherit Combine Foundation; }; - Tcl = {}; - Tk = {}; - UniformTypeIdentifiers = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; - UserNotifications = { inherit Foundation; }; - UserNotificationsUI = { inherit AppKit; }; - VideoDecodeAcceleration = {}; - VideoSubscriberAccount = { inherit Foundation; }; - VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; - Virtualization = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; - Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; - WebKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit JavaScriptCore Metal QuartzCore; }; - WidgetKit = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit Intents SwiftUI UniformTypeIdentifiers; }; - iTunesLibrary = { inherit Foundation; }; - vmnet = {}; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libSystem.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libSystem.nix deleted file mode 100644 index 5d57038a46573..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libSystem.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - stdenvNoCC, - buildPackages, - darwin-stubs, -}: - -stdenvNoCC.mkDerivation { - pname = "libSystem"; - inherit (darwin-stubs) version; - - nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ]; - - csu = [ - "bundle1.o" - "crt0.o" - "crt1.10.5.o" - "crt1.10.6.o" - "crt1.o" - "dylib1.10.5.o" - "dylib1.o" - "gcrt1.o" - "lazydylib1.o" - ]; - - buildCommand = - '' - mkdir -p $out/{include,lib/swift} - '' - # Copy each directory in ${darwin-stubs}/usr/include into $out/include - + '' - for dir in $(ls -d ${darwin-stubs}/usr/include/*/); do - cp -dr $dir $out/include - done - '' - # Copy each header and modulemap file in ${darwin-stubs}/usr/include into $out/include - + '' - cp -d \ - ${darwin-stubs}/usr/include/*.h \ - ${darwin-stubs}/usr/include/*.modulemap \ - $out/include - '' - # Remove curses.h, ncurses.h, ncurses_dll.h, and unctrl.h which conflict with ncurses. - # Then, remove the module map for ncurses. - # NOTE: The sed expression expects the module map to use consistent indentation across - # releases. If this changes, the sed expression will need to be updated. - # - # For example, right now we assume that there is one leading space before the - # "explicit" keyword and that the closing brace is on its own line (also with one - # leading space). - + '' - rm $out/include/{curses,ncurses,ncurses_dll,unctrl}.h - sed -i -e '/^ explicit module ncurses {/,/^ }$/d' $out/include/module.modulemap - '' - + '' - rm $out/include/tk*.h $out/include/tcl*.h - - cp -dr \ - ${darwin-stubs}/usr/lib/libSystem.* \ - ${darwin-stubs}/usr/lib/system \ - $out/lib - - # Extra libraries - for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.1 resolv; do - cp -d \ - ${darwin-stubs}/usr/lib/lib$name.tbd \ - ${darwin-stubs}/usr/lib/lib$name.*.tbd \ - $out/lib - done - - for name in os Dispatch; do - cp -dr \ - ${darwin-stubs}/usr/lib/swift/$name.swiftmodule \ - ${darwin-stubs}/usr/lib/swift/libswift$name.tbd \ - $out/lib/swift - done - - for f in $csu; do - from=${darwin-stubs}/usr/lib/$f - if [ -e "$from" ]; then - cp -d $from $out/lib - else - echo "Csu file '$from' doesn't exist: skipping" - fi - done - - chmod u+w -R $out/lib - find $out -name '*.tbd' -type f | while read tbd; do - rewrite-tbd \ - -c /usr/lib/libsystem.dylib:$out/lib/libsystem.dylib \ - -p /usr/lib/system/:$out/lib/system/ \ - -p /usr/lib/swift/:$out/lib/swift/ \ - -r ${builtins.storeDir} \ - "$tbd" - done - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libnetwork.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libnetwork.nix deleted file mode 100644 index e7bae2fc77a08..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libnetwork.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenvNoCC, darwin-stubs }: - -let - self = stdenvNoCC.mkDerivation { - pname = "libnetwork"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/lib - cp ${darwin-stubs}/usr/lib/libnetwork* $out/lib - ''; - - passthru.tbdRewrites.const."/usr/lib/libnetwork.dylib" = "${self}/lib/libnetwork.dylib"; - }; -in -self diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix deleted file mode 100644 index 14d7e92c8a540..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libobjc.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ stdenvNoCC, darwin-stubs }: - -let - self = stdenvNoCC.mkDerivation { - pname = "libobjc"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/{include,lib/swift} - cp -r ${darwin-stubs}/usr/include/objc $out/include - cp ${darwin-stubs}/usr/lib/libobjc* $out/lib - cp -r ${darwin-stubs}/usr/lib/swift/ObjectiveC.swiftmodule $out/lib/swift - cp ${darwin-stubs}/usr/lib/swift/libswiftObjectiveC.tbd $out/lib/swift - ''; - - passthru.tbdRewrites = { - const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib"; - const."/usr/lib/swift/libswiftObjectiveC.dylib" = "${self}/lib/swift/libswiftObjectiveC.dylib"; - }; - }; -in -self diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libpm.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libpm.nix deleted file mode 100644 index 110b9a1ab4789..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libpm.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - stdenvNoCC, - buildPackages, - darwin-stubs, -}: - -stdenvNoCC.mkDerivation { - pname = "libpm"; - inherit (darwin-stubs) version; - - dontUnpack = true; - dontBuild = true; - - nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ]; - - installPhase = '' - mkdir -p $out/lib - cp ${darwin-stubs}/usr/lib/libpm* $out/lib - ''; - - passthru.tbdRewrites = { - const."/usr/lib/libpmenergy.dylib" = "${placeholder "out"}/lib/libpmenergy.dylib"; - const."/usr/lib/libpmsample.dylib" = "${placeholder "out"}/lib/libpmsample.dylib"; - }; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/Xplugin.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/Xplugin.nix deleted file mode 100644 index 6e125c001183c..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/Xplugin.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - frameworks, - darwin-stubs, - stdenvNoCC, -}: - -stdenvNoCC.mkDerivation { - pname = "apple-lib-Xplugin"; - inherit (darwin-stubs) version; - - dontUnpack = true; - dontBuild = true; - - propagatedBuildInputs = with frameworks; [ - OpenGL - ApplicationServices - Carbon - IOKit - CoreGraphics - CoreServices - CoreText - ]; - - installPhase = '' - mkdir -p $out/include $out/lib - cp "${darwin-stubs}/include/Xplugin.h" $out/include/Xplugin.h - cp ${darwin-stubs}/usr/lib/libXplugin.1.tbd $out/lib - ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/default.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/default.nix deleted file mode 100644 index 87a36ba32b62e..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ callPackage }: - -{ - libDER = callPackage ./libDER.nix { }; - sandbox = callPackage ./sandbox.nix { }; - simd = callPackage ./simd.nix { }; - utmp = callPackage ./utmp.nix { }; - xpc = callPackage ./xpc.nix { }; - Xplugin = callPackage ./Xplugin.nix { }; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/libDER.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/libDER.nix deleted file mode 100644 index 4aa8e2bd95509..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/libDER.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ darwin-stubs, stdenvNoCC }: - -stdenvNoCC.mkDerivation { - pname = "apple-lib-libDER"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/include - cp -r ${darwin-stubs}/usr/include/libDER $out/include - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/sandbox.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/sandbox.nix deleted file mode 100644 index f4e9955a0b9b5..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/sandbox.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ darwin-stubs, stdenvNoCC }: - -stdenvNoCC.mkDerivation { - pname = "apple-lib-sandbox"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/include $out/lib - cp "${darwin-stubs}/usr/include/sandbox.h" $out/include/sandbox.h - cp "${darwin-stubs}/usr/lib/libsandbox.1.tbd" $out/lib - ln -s libsandbox.1.tbd $out/lib/libsandbox.tbd - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/simd.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/simd.nix deleted file mode 100644 index 45226a5bec59b..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/simd.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ darwin-stubs, stdenvNoCC }: - -stdenvNoCC.mkDerivation { - pname = "apple-lib-simd"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/include - cp -r ${darwin-stubs}/usr/include/simd $out/include - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/utmp.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/utmp.nix deleted file mode 100644 index bc85b9be35b50..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/utmp.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ darwin-stubs, stdenvNoCC }: - -stdenvNoCC.mkDerivation { - pname = "apple-lib-utmp"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/include - cp "${darwin-stubs}/include/utmp.h" $out/include - cp "${darwin-stubs}/include/utmpx.h" $out/include - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/xpc.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libs/xpc.nix deleted file mode 100644 index 8c9848daf9caf..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libs/xpc.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ darwin-stubs, stdenvNoCC }: - -stdenvNoCC.mkDerivation { - pname = "apple-lib-xpc"; - inherit (darwin-stubs) version; - - buildCommand = '' - mkdir -p $out/include - cp -r "${darwin-stubs}/usr/include/xpc" $out/include/xpc - cp "${darwin-stubs}/usr/include/launch.h" $out/include/launch.h - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-12.3/libunwind.nix b/pkgs/os-specific/darwin/apple-sdk-12.3/libunwind.nix deleted file mode 100644 index c1846a9bf92f5..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-12.3/libunwind.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - stdenvNoCC, - buildPackages, - darwin-stubs, -}: - -stdenvNoCC.mkDerivation { - pname = "libunwind"; - inherit (darwin-stubs) version; - - dontUnpack = true; - dontBuild = true; - - nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ]; - - installPhase = '' - mkdir -p $out/include/mach-o - - cp \ - ${darwin-stubs}/usr/include/libunwind.h \ - ${darwin-stubs}/usr/include/unwind.h \ - $out/include - - cp \ - ${darwin-stubs}/usr/include/mach-o/compact_unwind_encoding.h \ - $out/include/mach-o - ''; -} diff --git a/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh deleted file mode 100644 index 5d0f58f48b481..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh +++ /dev/null @@ -1,9 +0,0 @@ -linkSystemCoreFoundationFramework() { - NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}" - # gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not - # in the opensource release - # if the package needs private headers, we assume they also want to link with system CF - NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" -} - -preConfigureHooks+=(linkSystemCoreFoundationFramework) diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 1cd5afe193016..388de3730380e 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -1,360 +1,272 @@ -{ stdenv, stdenvNoCC, fetchurl, cpio, pbzx, pkgs, lib, darwin-stubs, print-reexports }: +# Compatibility stubs for packages that used the old SDK frameworks. +# TODO(@reckenrode) Make these stubs warn after framework usage has been cleaned up in nixpkgs. +{ lib, callPackage }: let - # sadly needs to be exported because security_tool needs it - sdk = stdenv.mkDerivation rec { - pname = "MacOS_SDK"; - version = "10.12"; - - # This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.12.merged-1.sucatalog, which we found by: - # 1. Google: site:swscan.apple.com and look for a name that seems appropriate for your version - # 2. In the resulting file, search for a file called DevSDK ending in .pkg - # 3. ??? - # 4. Profit - src = fetchurl { - url = "http://swcdn.apple.com/content/downloads/33/36/041-90419-A_7JJ4H9ZHO2/xs88ob5wjz6riz7g6764twblnvksusg4ps/DevSDK_OSX1012.pkg"; - sha256 = "13xq34sb7383b37hwy076gnhf96prpk1b4087p87xnwswxbrisih"; - }; - - nativeBuildInputs = [ cpio pbzx ]; - - outputs = [ "out" "dev" "man" ]; - - unpackPhase = '' - pbzx $src | cpio -idm - ''; - - sourceRoot = "."; - - installPhase = '' - mkdir -p $out - - cp -R System/Library $out - cp -R usr/* $out - - pushd $out/lib - cp ${darwin-stubs}/usr/lib/libcups*.tbd . - ln -s libcups.2.tbd libcups.tbd - ln -s libcupscgi.1.tbd libcupscgi.tbd - ln -s libcupsimage.2.tbd libcupsimage.tbd - ln -s libcupsmime.1.tbd libcupsmime.tbd - ln -s libcupsppdc.1.tbd libcupsppdc.tbd - popd - ''; - - meta = with lib; { - description = "Apple SDK ${version}"; - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - }; - }; - - mkFrameworkSubs = name: deps: - let - deps' = deps // { "${name}" = placeholder "out"; }; - substArgs = lib.concatMap (x: [ "--subst-var-by" x deps'."${x}" ]) (lib.attrNames deps'); - in lib.escapeShellArgs substArgs; - - framework = name: deps: stdenv.mkDerivation { - name = "apple-framework-${name}"; - - dontUnpack = true; - - # because we copy files from the system - preferLocalBuild = true; - - disallowedRequisites = [ sdk ]; - - nativeBuildInputs = [ print-reexports ]; - - extraTBDFiles = []; - - installPhase = '' - linkFramework() { - local path="$1" - local nested_path="$1" - if [ "$path" == "JavaNativeFoundation.framework" ]; then - local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework" - fi - if [ "$path" == "JavaRuntimeSupport.framework" ]; then - local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework" - fi - local name="$(basename "$path" .framework)" - local current="$(readlink "/System/Library/Frameworks/$nested_path/Versions/Current")" - if [ -z "$current" ]; then - current=A - fi - - local dest="$out/Library/Frameworks/$path" - - mkdir -p "$dest/Versions/$current" - pushd "$dest/Versions/$current" >/dev/null - - if [ -d "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" ]; then - cp -R "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" . - elif [ -d "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" ]; then - current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")" - cp -R "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" . - fi - - local tbd_source=${darwin-stubs}/System/Library/Frameworks/$nested_path/Versions/$current - if [ "${name}" != "Kernel" ]; then - # The Kernel.framework has headers but no actual library component. - cp -v $tbd_source/*.tbd . - fi - - if [ -d "$tbd_source/Libraries" ]; then - mkdir Libraries - cp -v $tbd_source/Libraries/*.tbd Libraries/ - fi - - ln -s -L "/System/Library/Frameworks/$nested_path/Versions/$current/Resources" - - if [ -f "/System/Library/Frameworks/$nested_path/module.map" ]; then - ln -s "/System/Library/Frameworks/$nested_path/module.map" - fi - - pushd "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current" >/dev/null - local children=$(echo Frameworks/*.framework) - popd >/dev/null - - for child in $children; do - childpath="$path/Versions/$current/$child" - linkFramework "$childpath" - done - - pushd ../.. >/dev/null - ln -s "$current" Versions/Current - ln -s Versions/Current/* . - popd >/dev/null - - popd >/dev/null - } - - linkFramework "${name}.framework" - - # linkFramework is recursive, the rest of the processing is not. - - local tbd_source=${darwin-stubs}/System/Library/Frameworks/${name}.framework - for tbd in $extraTBDFiles; do - local tbd_dest_dir=$out/Library/Frameworks/${name}.framework/$(dirname "$tbd") - mkdir -p "$tbd_dest_dir" - cp -v "$tbd_source/$tbd" "$tbd_dest_dir" - done - - # Fix and check tbd re-export references - find $out -name '*.tbd' | while read tbd; do - echo "Fixing re-exports in $tbd" - substituteInPlace "$tbd" ${mkFrameworkSubs name deps} - - echo "Checking re-exports in $tbd" - print-reexports "$tbd" | while read target; do - local expected="''${target%.dylib}.tbd" - if ! [ -e "$expected" ]; then - echo -e "Re-export missing:\n\t$target\n\t(expected $expected)" - echo -e "While processing\n\t$tbd" - exit 1 - else - echo "Re-exported target $target ok" - fi - done - done - ''; - - propagatedBuildInputs = builtins.attrValues deps; - - meta = with lib; { - description = "Apple SDK framework ${name}"; - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - }; - }; - - tbdOnlyFramework = name: { private ? true }: stdenv.mkDerivation { - name = "apple-framework-${name}"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/Library/Frameworks/ - cp -r ${darwin-stubs}/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework \ - $out/Library/Frameworks - - cd $out/Library/Frameworks/${name}.framework - - versions=(./Versions/*) - if [ "''${#versions[@]}" != 1 ]; then - echo "Unable to determine current version of framework ${name}" - exit 1 - fi - current=$(basename ''${versions[0]}) - - chmod u+w -R . - ln -s "$current" Versions/Current - ln -s Versions/Current/* . - - # NOTE there's no re-export checking here, this is probably wrong - ''; - }; -in rec { - libs = { - xpc = stdenv.mkDerivation { - name = "apple-lib-xpc"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include - pushd $out/include >/dev/null - cp -r "${lib.getDev sdk}/include/xpc" $out/include/xpc - cp "${lib.getDev sdk}/include/launch.h" $out/include/launch.h - popd >/dev/null - ''; - }; - - Xplugin = stdenv.mkDerivation { - name = "apple-lib-Xplugin"; - dontUnpack = true; - - # Not enough - __propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ]; - - propagatedBuildInputs = with frameworks; [ - OpenGL ApplicationServices Carbon IOKit CoreGraphics CoreServices CoreText - ]; - - installPhase = '' - mkdir -p $out/include $out/lib - ln -s "${lib.getDev sdk}/include/Xplugin.h" $out/include/Xplugin.h - cp ${darwin-stubs}/usr/lib/libXplugin.1.tbd $out/lib - ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd - ''; - }; - - utmp = stdenv.mkDerivation { - name = "apple-lib-utmp"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include - pushd $out/include >/dev/null - ln -s "${lib.getDev sdk}/include/utmp.h" - ln -s "${lib.getDev sdk}/include/utmpx.h" - popd >/dev/null - ''; - }; - - sandbox = stdenv.mkDerivation { - name = "apple-lib-sandbox"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include $out/lib - ln -s "${lib.getDev sdk}/include/sandbox.h" $out/include/sandbox.h - cp "${darwin-stubs}/usr/lib/libsandbox.1.tbd" $out/lib - ln -s libsandbox.1.tbd $out/lib/libsandbox.tbd - ''; - }; - - simd = stdenvNoCC.mkDerivation { - name = "apple-lib-simd"; - - preferLocalBuild = true; - allowSubstitutes = false; - - buildCommand = "echo 'simd library not available in the 10.12 SDK'; exit 1"; - }; - }; - - overrides = super: { - AppKit = lib.overrideDerivation super.AppKit (drv: { - __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps or [] ++ [ - "/System/Library/PrivateFrameworks/" - ]; - }); - - Carbon = lib.overrideDerivation super.Carbon (drv: { - extraTBDFiles = [ "Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering.tbd" ]; - }); - - CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { - setupHook = ./cf-setup-hook.sh; - }); - - CoreMedia = lib.overrideDerivation super.CoreMedia (drv: { - __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps or [] ++ [ - "/System/Library/Frameworks/CoreImage.framework" - ]; - }); - - CoreMIDI = lib.overrideDerivation super.CoreMIDI (drv: { - __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps or [] ++ [ - "/System/Library/PrivateFrameworks/" - ]; - setupHook = ./private-frameworks-setup-hook.sh; - }); - - IMServicePlugIn = lib.overrideDerivation super.IMServicePlugIn (drv: { - extraTBDFiles = [ "Versions/A/Frameworks/IMServicePlugInSupport.framework/Versions/A/IMServicePlugInSupport.tbd" ]; - }); - - Security = lib.overrideDerivation super.Security (drv: { - setupHook = ./security-setup-hook.sh; - }); - - QuartzCore = lib.overrideDerivation super.QuartzCore (drv: { - installPhase = drv.installPhase + '' - f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h" - substituteInPlace "$f" \ - --replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage" - ''; - }); - - MetalKit = lib.overrideDerivation super.MetalKit (drv: { - installPhase = drv.installPhase + '' - mkdir -p $out/include/simd - cp ${lib.getDev sdk}/include/simd/*.h $out/include/simd/ - ''; - }); - - System = lib.overrideDerivation super.System (drv: { - installPhase = '' - mkdir -p $out/Library/Frameworks/System.framework/Versions/B - ln -s $out/Library/Frameworks/System.framework/Versions/{B,Current} - ln -s ${pkgs.darwin.Libsystem}/lib/libSystem.B.tbd $out/Library/Frameworks/System.framework/Versions/B/System.tbd - ln -s $out/Library/Frameworks/System.framework/{Versions/Current/,}System.tbd - ''; - }); - - WebKit = lib.overrideDerivation super.WebKit (drv: { - extraTBDFiles = [ - "Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore.tbd" - "Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd" - ]; - }); - } // lib.genAttrs [ + mkStub = callPackage ./mk-stub.nix { } "10.12"; + + frameworks = lib.genAttrs [ + "AGL" + "AVFoundation" + "AVKit" + "Accelerate" + "Accounts" + "AddressBook" + "AppKit" + "AppKitScripting" + "AppleScriptKit" + "AppleScriptObjC" + "ApplicationServices" + "AudioToolbox" + "AudioUnit" + "AudioVideoBridging" + "Automator" + "CFNetwork" + "CalendarStore" + "Carbon" + "Cocoa" + "Collaboration" "ContactsPersistence" + "CoreAudio" + "CoreAudioKit" + "CoreBluetooth" + "CoreData" + "CoreFoundation" + "CoreGraphics" + "CoreImage" + "CoreLocation" + "CoreMIDI" + "CoreMIDIServer" + "CoreMedia" + "CoreMediaIO" + "CoreServices" "CoreSymbolication" + "CoreText" + "CoreVideo" + "CoreWLAN" + "DVDPlayback" "DebugSymbols" + "DirectoryService" + "DiscRecording" + "DiscRecordingUI" + "DiskArbitration" "DisplayServices" + "EventKit" + "ExceptionHandling" + "FWAUserLib" + "ForceFeedback" + "Foundation" + "GLKit" + "GLUT" + "GSS" "GameCenter" + "GameController" + "GameKit" + "GameplayKit" + "Hypervisor" + "ICADevices" + "IMServicePlugIn" + "IOBluetooth" + "IOBluetoothUI" + "IOKit" + "IOSurface" + "ImageCaptureCore" + "ImageIO" + "InputMethodKit" + "InstallerPlugins" + "InstantMessage" + "JavaFrameEmbedding" + "JavaNativeFoundation" + "JavaRuntimeSupport" + "JavaScriptCore" + "JavaVM" + "Kerberos" + "Kernel" + "LDAP" + "LatentSemanticMapping" + "LocalAuthentication" + "MapKit" + "MediaAccessibility" + "MediaPlayer" + "MediaToolbox" + "Metal" + "MetalKit" + "ModelIO" "MultitouchSupport" + "NetFS" + "OSAKit" + "OpenAL" + "OpenCL" + "OpenDirectory" + "OpenGL" + "PCSC" + "PreferencePanes" + "PubSub" + "QTKit" + "Quartz" + "QuartzCore" + "QuickLook" + "QuickTime" + "SceneKit" + "ScreenSaver" + "Scripting" + "ScriptingBridge" + "Security" + "SecurityFoundation" + "SecurityInterface" + "ServiceManagement" "SkyLight" + "Social" + "SpriteKit" + "StoreKit" + "SyncServices" + "System" + "SystemConfiguration" + "TWAIN" + "Tcl" "UIFoundation" - ] - (x: tbdOnlyFramework x {}); - - bareFrameworks = lib.mapAttrs framework (import ./frameworks.nix { - inherit frameworks libs; - inherit (pkgs.darwin) libobjc; - }); - - frameworks = bareFrameworks // overrides bareFrameworks; - - inherit darwin-stubs; - - objc4 = pkgs.darwin.libobjc; - - sdkRoot = pkgs.callPackage ./sdkRoot.nix { sdkVersion = "10.12.4"; }; - - inherit (pkgs.darwin) Libsystem; - - inherit sdk; + "VideoDecodeAcceleration" + "VideoToolbox" + "WebKit" + "vmnet" + ] mkStub; + + bareFrameworks = lib.genAttrs [ + "AGL" + "AVFoundation" + "AVKit" + "Accelerate" + "Accounts" + "AddressBook" + "AppKit" + "AppKitScripting" + "AppleScriptKit" + "AppleScriptObjC" + "ApplicationServices" + "AudioToolbox" + "AudioUnit" + "AudioVideoBridging" + "Automator" + "CFNetwork" + "CalendarStore" + "Carbon" + "Cocoa" + "Collaboration" + "CoreAudio" + "CoreAudioKit" + "CoreBluetooth" + "CoreData" + "CoreFoundation" + "CoreGraphics" + "CoreImage" + "CoreLocation" + "CoreMIDI" + "CoreMIDIServer" + "CoreMedia" + "CoreMediaIO" + "CoreServices" + "CoreText" + "CoreVideo" + "CoreWLAN" + "DVDPlayback" + "DirectoryService" + "DiscRecording" + "DiscRecordingUI" + "DiskArbitration" + "EventKit" + "ExceptionHandling" + "FWAUserLib" + "ForceFeedback" + "Foundation" + "GLKit" + "GLUT" + "GSS" + "GameCenter" + "GameController" + "GameKit" + "GameplayKit" + "Hypervisor" + "ICADevices" + "IMServicePlugIn" + "IOBluetooth" + "IOBluetoothUI" + "IOKit" + "IOSurface" + "ImageCaptureCore" + "ImageIO" + "InputMethodKit" + "InstallerPlugins" + "InstantMessage" + "JavaFrameEmbedding" + "JavaNativeFoundation" + "JavaRuntimeSupport" + "JavaScriptCore" + "JavaVM" + "Kerberos" + "Kernel" + "LDAP" + "LatentSemanticMapping" + "LocalAuthentication" + "MapKit" + "MediaAccessibility" + "MediaPlayer" + "MediaToolbox" + "Metal" + "MetalKit" + "ModelIO" + "NetFS" + "OSAKit" + "OpenAL" + "OpenCL" + "OpenDirectory" + "OpenGL" + "PCSC" + "PreferencePanes" + "PubSub" + "QTKit" + "Quartz" + "QuartzCore" + "QuickLook" + "QuickTime" + "SceneKit" + "ScreenSaver" + "Scripting" + "ScriptingBridge" + "Security" + "SecurityFoundation" + "SecurityInterface" + "ServiceManagement" + "Social" + "SpriteKit" + "StoreKit" + "SyncServices" + "System" + "SystemConfiguration" + "TWAIN" + "Tcl" + "VideoDecodeAcceleration" + "VideoToolbox" + "WebKit" + "vmnet" + ] mkStub; +in +{ + inherit bareFrameworks frameworks; + + libs = lib.genAttrs [ + "Xplugin" + "sandbox" + "simd" + "utmp" + "xpc" + ] mkStub; + + version = "10.12"; } +// lib.genAttrs [ + "darwin-stubs" + "Libsystem" + "objc4" + "sdk" + "sdkRoot" +] mkStub diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix deleted file mode 100644 index a9fbcc066a3ca..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ /dev/null @@ -1,130 +0,0 @@ -# Current as of 10.12 -# Epic weird knot-tying happening here. -# TODO: clean up the process for generating this and include it - -{ frameworks, libs, libobjc, }: - -with frameworks; with libs; { - AGL = { inherit Carbon OpenGL; }; - AVFoundation = { inherit ApplicationServices CoreGraphics CoreMedia MediaToolbox; }; - AVKit = {}; - Accounts = {}; - AddressBook = { inherit libobjc Carbon ContactsPersistence; }; - AppKit = { inherit ApplicationServices AudioToolbox AudioUnit Foundation QuartzCore UIFoundation; }; - AppKitScripting = {}; - AppleScriptKit = {}; - AppleScriptObjC = {}; - AudioToolbox = { inherit CoreAudio CoreMIDI; }; - AudioUnit = { inherit AudioToolbox Carbon CoreAudio; }; - AudioVideoBridging = { inherit Foundation; }; - Automator = {}; - CFNetwork = {}; - CalendarStore = {}; - Cocoa = { inherit AppKit CoreData; }; - Collaboration = {}; - # Impure version of CoreFoundation, this should not be used unless another - # framework includes headers that are not available in the pure version. - CoreFoundation = {}; - CoreAudio = { inherit IOKit; }; - CoreAudioKit = { inherit AudioUnit; }; - CoreData = {}; - CoreGraphics = { inherit Accelerate IOKit IOSurface SystemConfiguration; }; - CoreImage = {}; - CoreLocation = {}; - CoreMIDI = {}; - CoreMIDIServer = { inherit CoreMIDI; }; - CoreMedia = { inherit ApplicationServices AudioToolbox AudioUnit CoreAudio CoreGraphics CoreVideo; }; - CoreMediaIO = { inherit CoreMedia; }; - CoreText = { inherit CoreGraphics; }; - CoreVideo = { inherit ApplicationServices CoreGraphics IOSurface OpenGL; }; - CoreWLAN = { inherit SecurityFoundation; }; - DVDPlayback = {}; - DirectoryService = {}; - DiscRecording = { inherit libobjc CoreServices IOKit; }; - DiscRecordingUI = {}; - DiskArbitration = { inherit IOKit; }; - EventKit = {}; - ExceptionHandling = {}; - FWAUserLib = {}; - ForceFeedback = { inherit IOKit; }; - Foundation = { inherit libobjc CoreFoundation Security ApplicationServices SystemConfiguration; }; - GLKit = {}; - GLUT = { inherit OpenGL; }; - GSS = {}; - GameCenter = {}; - GameController = {}; - GameKit = { inherit Cocoa Foundation GameCenter GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit; }; - GameplayKit = {}; - Hypervisor = {}; - ICADevices = { inherit libobjc Carbon IOBluetooth; }; - IMServicePlugIn = {}; - IOBluetoothUI = { inherit IOBluetooth; }; - IOKit = {}; - IOSurface = { inherit IOKit xpc; }; - ImageCaptureCore = {}; - ImageIO = { inherit CoreGraphics; }; - InputMethodKit = { inherit Carbon; }; - InstallerPlugins = {}; - InstantMessage = {}; - JavaFrameEmbedding = {}; - JavaNativeFoundation = {}; - JavaRuntimeSupport = {}; - JavaScriptCore = { inherit libobjc; }; - Kerberos = {}; - Kernel = { inherit IOKit; }; - LDAP = {}; - LatentSemanticMapping = { inherit Carbon; }; - LocalAuthentication = {}; - MapKit = {}; - MediaAccessibility = { inherit CoreGraphics CoreText QuartzCore; }; - MediaPlayer = {}; - MediaToolbox = { inherit AudioToolbox AudioUnit CoreMedia; }; - Metal = {}; - MetalKit = { inherit ModelIO Metal; }; - ModelIO = {}; - NetFS = {}; - OSAKit = { inherit Carbon; }; - OpenAL = {}; - OpenCL = { inherit IOSurface OpenGL; }; - OpenGL = {}; - PCSC = { inherit CoreData; }; - PreferencePanes = {}; - PubSub = {}; - QTKit = { inherit CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox; }; - QuickLook = { inherit ApplicationServices; }; - SceneKit = {}; - ScreenSaver = {}; - Scripting = {}; - ScriptingBridge = {}; - Security = { inherit IOKit; }; - SecurityFoundation = {}; - SecurityInterface = { inherit Security SecurityFoundation; }; - ServiceManagement = { inherit Security; }; - Social = {}; - SpriteKit = {}; - StoreKit = {}; - SyncServices = {}; - System = {}; - SystemConfiguration = { inherit Security; }; - TWAIN = { inherit Carbon; }; - Tcl = {}; - VideoDecodeAcceleration = { inherit CoreVideo; }; - VideoToolbox = { inherit CoreMedia CoreVideo; }; - WebKit = { inherit libobjc ApplicationServices Carbon JavaScriptCore OpenGL; }; - - # Umbrellas - Accelerate = { inherit CoreWLAN IOBluetooth; }; - ApplicationServices = { inherit CoreGraphics CoreServices CoreText ImageIO; }; - Carbon = { inherit libobjc ApplicationServices CoreServices Foundation IOKit Security QuartzCore; }; - CoreBluetooth = {}; - # TODO: figure out which part of the umbrella depends on CoreFoundation and move it there. - CoreServices = { inherit CFNetwork CoreFoundation CoreAudio CoreData DiskArbitration Security NetFS OpenDirectory ServiceManagement; }; - IOBluetooth = { inherit CoreBluetooth IOKit; }; - JavaVM = {}; - OpenDirectory = {}; - Quartz = { inherit QuartzCore QuickLook QTKit; }; - QuartzCore = { inherit libobjc ApplicationServices CoreVideo OpenCL CoreImage Metal; }; - QuickTime = { inherit ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore; }; - - vmnet = {}; -} diff --git a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix deleted file mode 100644 index c111492f2b3d6..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix +++ /dev/null @@ -1,256 +0,0 @@ -rec { - CFNetwork = [ - "/System/Library/Frameworks/CFNetwork.framework" - "/usr/lib/libsqlite3.dylib" - "/usr/lib/libxml2.2.dylib" - ]; - ForceFeedback = [ - "/System/Library/Frameworks/ForceFeedback.framework" - ]; - AGL = [ - "/System/Library/Frameworks/AGL.framework" - ]; - IOKit = [ - "/System/Library/Frameworks/IOKit.framework" - ]; - JavaScriptCore = [ - "/System/Library/Frameworks/JavaScriptCore.framework" - ]; - QuickLook = [ - "/System/Library/Frameworks/QuickLook.framework" - ]; - Quartz = [ - "/System/Library/Frameworks/Quartz.framework" - "/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo" - "/System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF" - "/usr/lib/libspindump.dylib" - ]; - ImageCaptureCore = [ - "/System/Library/Frameworks/ImageCaptureCore.framework" - ]; - VideoToolbox = [ - "/System/Library/Frameworks/VideoToolbox.framework" - "/System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA" - ]; - QuickTime = [ - "/System/Library/Frameworks/QuickTime.framework" - ]; - CoreMedia = [ - "/System/Library/Frameworks/CoreMedia.framework" - ]; - CoreMediaIO = [ - "/System/Library/Frameworks/CoreMediaIO.framework" - "/System/Library/PrivateFrameworks/AppSandbox.framework/Versions/A/AppSandbox" - "/System/Library/PrivateFrameworks/AppContainer.framework/Versions/A/AppContainer" - "/System/Library/PrivateFrameworks/SecCodeWrapper.framework/Versions/A/SecCodeWrapper" - "/System/Library/PrivateFrameworks/XPCService.framework/Versions/A/XPCService" - "/usr/lib/libsandbox.1.dylib" - "/usr/lib/libMatch.1.dylib" - ]; - MediaToolbox = [ - "/System/Library/Frameworks/MediaToolbox.framework" - "/System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC" - "/System/Library/PrivateFrameworks/NetworkStatistics.framework/Versions/A/NetworkStatistics" - ]; - QTKit = [ - "/System/Library/Frameworks/QTKit.framework" - "/System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreMediaAuthoring" - ]; - OSAKit = [ - "/System/Library/Frameworks/OSAKit.framework" - "/usr/lib/libexslt.0.dylib" - ]; - WebKit = [ - "/System/Library/Frameworks/WebKit.framework" - ]; - DiskArbitration = [ - "/System/Library/Frameworks/DiskArbitration.framework" - ]; - Security = [ - "/System/Library/Frameworks/Security.framework" - "/usr/lib/libbsm.0.dylib" - "/usr/lib/libbz2.1.0.dylib" - "/usr/lib/libpam.2.dylib" - "/usr/lib/libxar.1.dylib" - "/usr/lib/libxml2.2.dylib" - "/usr/lib/libsqlite3.dylib" - ]; - GSS = [ - "/System/Library/Frameworks/GSS.framework" - ]; - Kerberos = [ - "/System/Library/Frameworks/Kerberos.framework" - ]; - CoreServices = [ - "/System/Library/Frameworks/CoreServices.framework" - "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" - "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC" - "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" - "/usr/lib/libmecabra.dylib" - "/usr/lib/libcmph.dylib" - "/usr/lib/libiconv.2.dylib" - "/usr/lib/libxslt.1.dylib" - ] ++ Foundation; - IOSurface = [ - "/System/Library/Frameworks/IOSurface.framework" - ]; - CoreGraphics = [ - "/System/Library/Frameworks/CoreGraphics.framework" - "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport" - "/usr/lib/libbsm.0.dylib" - "/usr/lib/libz.1.dylib" - ]; - CoreText = [ - "/System/Library/Frameworks/CoreText.framework" - ]; - ImageIO = [ - "/System/Library/Frameworks/ImageIO.framework" - ]; - ApplicationServices = [ - "/System/Library/Frameworks/ApplicationServices.framework" - "/usr/lib/libcups.2.dylib" - "/usr/lib/libresolv.9.dylib" - ] ++ AudioToolbox; - OpenGL = [ - "/System/Library/Frameworks/OpenGL.framework" - ]; - CoreVideo = [ - "/System/Library/Frameworks/CoreVideo.framework" - ]; - QuartzCore = [ - "/System/Library/Frameworks/QuartzCore.framework" - "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport" - ]; - PCSC = [ - "/System/Library/Frameworks/PCSC.framework" - ]; - AppKit = [ - "/System/Library/Frameworks/AppKit.framework" - "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211" - "/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG" - "/System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA" - "/System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup" - "/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary" - "/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth" - "/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication" - "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI" - "/System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi" - "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport" - "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" - "/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols" - "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" - "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore" - "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" - "/System/Library/PrivateFrameworks/Heimdal.framework/Heimdal" - "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/Current" - "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal" - "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" - "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" - "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport" - "/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth" - "/System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis" - "/System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices" - "/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing" - "/System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore" - "/System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication" - "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC" - "/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation" - "/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport" - "/usr/lib/libCRFSuite.dylib" - "/usr/lib/libOpenScriptingUtil.dylib" - "/usr/lib/libarchive.2.dylib" - "/usr/lib/libbsm.0.dylib" - "/usr/lib/libbz2.1.0.dylib" - "/usr/lib/libc++.1.dylib" - "/usr/lib/libc++abi.dylib" - "/usr/lib/libcmph.dylib" - "/usr/lib/libcups.2.dylib" - "/usr/lib/libextension.dylib" - "/usr/lib/libheimdal-asn1.dylib" - "/usr/lib/libiconv.2.dylib" - "/usr/lib/libicucore.A.dylib" - "/usr/lib/liblangid.dylib" - "/usr/lib/liblzma.5.dylib" - "/usr/lib/libmecabra.dylib" - "/usr/lib/libpam.2.dylib" - "/usr/lib/libresolv.9.dylib" - "/usr/lib/libsqlite3.dylib" - "/usr/lib/libxar.1.dylib" - "/usr/lib/libxml2.2.dylib" - "/usr/lib/libxslt.1.dylib" - "/usr/lib/libz.1.dylib" - ]; - Foundation = [ - "/System/Library/Frameworks/Foundation.framework" - "/usr/lib/libextension.dylib" - "/usr/lib/libarchive.2.dylib" - "/usr/lib/liblzma.5.dylib" - "/usr/lib/liblangid.dylib" - "/usr/lib/libCRFSuite.dylib" - ]; - CoreData = [ - "/System/Library/Frameworks/CoreData.framework" - ]; - Cocoa = [ - "/System/Library/Frameworks/Cocoa.framework" - "/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation" - "/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A" - ]; - Carbon = [ - "/System/Library/Frameworks/Carbon.framework" - "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI" - "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" - "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" - "/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary" - "/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing" - "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211" - "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" - ]; - CoreAudio = [ - "/System/Library/Frameworks/CoreAudio.framework" - ]; - AudioUnit = [ - "/System/Library/Frameworks/AudioUnit.framework" - ]; - CoreMIDI = [ - "/System/Library/Frameworks/CoreMIDI.framework" - ]; - AudioToolbox = [ - "/System/Library/Frameworks/AudioToolbox.framework" - ]; - SystemConfiguration = [ - "/System/Library/Frameworks/SystemConfiguration.framework" - ]; - NetFS = [ - "/System/Library/Frameworks/NetFS.framework" - "/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth" - "/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport" - ]; - Accelerate = [ - "/System/Library/Frameworks/Accelerate.framework" - ]; - OpenDirectory = [ - "/System/Library/Frameworks/OpenDirectory.framework" - ]; - ServiceManagement = [ - "/System/Library/Frameworks/ServiceManagement.framework" - ]; - OpenCL = [ - "/System/Library/Frameworks/OpenCL.framework" - ]; - CoreWLAN = [ - "/System/Library/Frameworks/CoreWLAN.framework" - ]; - IOBluetooth = [ - "/System/Library/Frameworks/IOBluetooth.framework" - ] ++ AudioUnit ++ CoreBluetooth; - CoreBluetooth = [ - "/System/Library/Frameworks/CoreBluetooth.framework" - ]; - SecurityFoundation = [ - "/System/Library/Frameworks/SecurityFoundation.framework" - ]; - Kernel = [ - "/System/Library/Frameworks/Kernel.framework" - ]; -} diff --git a/pkgs/os-specific/darwin/apple-sdk/mk-stub.nix b/pkgs/os-specific/darwin/apple-sdk/mk-stub.nix new file mode 100644 index 0000000000000..0a0b258998e33 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk/mk-stub.nix @@ -0,0 +1,14 @@ +{ stdenvNoCC }: + +version: pname: +stdenvNoCC.mkDerivation { + inherit pname version; + + buildCommand = '' + mkdir -p "$out" + echo "Individual frameworks have been deprecated. See the stdenv documentation for how to use `apple-sdk`" \ + > "$out/README" + ''; + + passthru.isDarwinCompatStub = true; +} diff --git a/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh deleted file mode 100644 index a351c39de1307..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh +++ /dev/null @@ -1,8 +0,0 @@ -addPrivateFrameworks() { - flag="-F/System/Library/PrivateFrameworks" - if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then - NIX_CFLAGS_COMPILE+=" $flag" - fi -} - -addEnvHooks "$hostOffset" addPrivateFrameworks diff --git a/pkgs/os-specific/darwin/apple-sdk/sdkRoot.nix b/pkgs/os-specific/darwin/apple-sdk/sdkRoot.nix deleted file mode 100644 index 67d9cbe031059..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/sdkRoot.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - lib, - runCommand, - writeText, - sdkVersion, -}: - -let - sdkName = "MacOSX${sdkVersion}"; - toolchainName = "com.apple.dt.toolchain.XcodeDefault"; - productBuildVer = null; - - inherit (lib.generators) toPlist toJSON; - - SDKSettings = { - CanonicalName = "macosx${sdkVersion}"; - DisplayName = "macOS ${sdkVersion}"; - Toolchains = [ toolchainName ]; - Version = sdkVersion; - MaximumDeploymentTarget = "${sdkVersion}.99"; - isBaseSDK = "YES"; - }; - - SystemVersion = - lib.optionalAttrs (productBuildVer != null) { ProductBuildVersion = productBuildVer; } - // { - ProductName = "macOS"; - ProductVersion = sdkVersion; - }; -in -runCommand "sdkroot-${sdkVersion}" { } '' - sdk="$out/${sdkName}.sdk" - - install -D ${writeText "SDKSettings.plist" (toPlist { } SDKSettings)} "$sdk/SDKSettings.plist" - install -D ${writeText "SDKSettings.json" (toJSON { } SDKSettings)} "$sdk/SDKSettings.json" - install -D ${ - writeText "SystemVersion.plist" (toPlist { } SystemVersion) - } "$sdk/System/Library/CoreServices/SystemVersion.plist" - - ln -s "$sdk" "$sdk/usr" - - install -D '${../../../build-support/setup-hooks/role.bash}' "$out/nix-support/setup-hook" - cat >> "$out/nix-support/setup-hook" <<-hook - # - # See comments in cc-wrapper's setup hook. This works exactly the same way. - # - [[ -z \''${strictDeps-} ]] || (( "\$hostOffset" < 0 )) || return 0 - - sdkRootHook() { - # See ../../../build-support/setup-hooks/role.bash - local role_post - getHostRoleEnvHook - - # Only set the SDK root if one has not been set via this hook or some other means. - if [[ ! \$NIX_CFLAGS_COMPILE =~ isysroot ]]; then - export NIX_CFLAGS_COMPILE\''${role_post}+=' -isysroot $out/${sdkName}.sdk' - fi - } - - # See ../../../build-support/setup-hooks/role.bash - getTargetRole - - addEnvHooks "\$targetOffset" sdkRootHook - - # No local scope in sourced file - unset -v role_post - hook -'' diff --git a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh deleted file mode 100644 index 35cea773f98b5..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh +++ /dev/null @@ -1,10 +0,0 @@ -noDeprecatedDeclarations() { - # Security.framework has about 2000 deprecated constants, all of which the user will be - # warned about at compilation time - flag="-Wno-deprecated-declarations" - if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then - NIX_CFLAGS_COMPILE+=" $flag" - fi -} - -addEnvHooks "$hostOffset" noDeprecatedDeclarations diff --git a/pkgs/os-specific/darwin/apple-source-releases/AvailabilityVersions/default.nix b/pkgs/os-specific/darwin/apple-source-releases/AvailabilityVersions/package.nix similarity index 62% rename from pkgs/os-specific/darwin/apple-source-releases/AvailabilityVersions/default.nix rename to pkgs/os-specific/darwin/apple-source-releases/AvailabilityVersions/package.nix index c80dd6235e41a..2625f276923eb 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/AvailabilityVersions/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/AvailabilityVersions/package.nix @@ -1,16 +1,27 @@ { lib, - stdenvNoCC, - appleDerivation', - gnused, - python3, + apple-sdk, + buildPackages, + mkAppleDerivation, unifdef, }: -appleDerivation' stdenvNoCC { - nativeBuildInputs = [ unifdef ]; +let + inherit (buildPackages) gnused python3; + xnu = apple-sdk.sourceRelease "xnu"; +in +mkAppleDerivation (finalAttrs: { + releaseName = "AvailabilityVersions"; + + patches = [ + # Add support for setting an upper bound, which is needed by the `gen-headers` script. + # It avoids having pre-process the DSL to remove unwanted versions. + ./patches/0001-Support-setting-an-upper-bound-on-versions.patch + ]; - patches = [ ./0001-Support-setting-an-upper-bound-on-versions.patch ]; + noCC = true; + + nativeBuildInputs = [ unifdef ]; buildPhase = '' runHook preBuild @@ -18,7 +29,6 @@ appleDerivation' stdenvNoCC { declare -a unifdef_sources=( os_availability.modulemap os_availability_private.modulemap - AvailabilityPrivate.modulemap ) unifdef -x2 -UBUILD_FOR_DRIVERKIT -m $(for x in "''${unifdef_sources[@]}"; do echo templates/$x; done) @@ -33,10 +43,20 @@ appleDerivation' stdenvNoCC { cp -r availability.dsl templates "$out/share/availability/" substitute availability "$out/libexec/availability" \ - --replace-fail '/usr/bin/env python3' '${lib.getBin python3}/bin/python3' \ + --replace-fail '/usr/bin/env python3' '${lib.getExe python3}' \ --replace-fail 'f"{os.path.abspath(os.path.dirname(sys.argv[0]))}/' "\"$out/share/availability/" chmod a+x "$out/libexec/availability" + substitute ${xnu}/bsd/sys/make_symbol_aliasing.sh "$out/libexec/make_symbol_aliasing.sh" \ + ${ + if lib.versionOlder (lib.getVersion xnu) "6153.11.26" then + ''--replace-fail "\''${SDKROOT}/usr/local/libexec/availability.pl" "$out/libexec/availability" \'' + else + ''--replace-fail "\''${SDKROOT}/\''${DRIVERKITROOT}/usr/local/libexec/availability.pl" "$out/libexec/availability" \'' + } + --replace-fail '--macosx' '--macosx --threshold $SDKROOT' + chmod a+x "$out/libexec/make_symbol_aliasing.sh" + cat <