Unverified Commit 5ced6bb1 authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

apple-sdk: remove old bootstrap tools workaround

The stubs can unconditionally be processed now that the bootstrap tools
have both `jq` and `llvm-readtapi`.
parent 18c8cb56
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
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);
  disallowedPackages = builtins.fromJSON (builtins.readFile ../metadata/disallowed-packages.json);
in

{
@@ -10,13 +8,6 @@ in
  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 =
+1 −5
Original line number Diff line number Diff line
@@ -36,12 +36,8 @@ let
      (callPackage ./common/passthru-private-frameworks.nix { inherit sdkVersion; })
      (callPackage ./common/passthru-source-release-files.nix { inherit sdkVersion; })
      (callPackage ./common/remove-disallowed-packages.nix { })
      (callPackage ./common/process-stubs.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 llvm-readtapi.
    ++ lib.optional (jq != null && lib.getName llvm != "bootstrap-stage0-llvm") (
      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 { })