From d1c25395231689272144d9903d18a42f7ed6564f Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 29 Sep 2024 18:25:05 -0400 Subject: [PATCH] darwin: add mkStub for deprecating frameworks --- pkgs/os-specific/darwin/apple-sdk/mk-stub.nix | 14 ++++++++++++++ pkgs/top-level/darwin-packages.nix | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/os-specific/darwin/apple-sdk/mk-stub.nix 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 000000000000..0a0b258998e3 --- /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/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index c47cc3e565e7..b5fb2e0566b8 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -32,6 +32,8 @@ let pkg ) (old.extraBuildInputs or [ ]); }); + + mkStub = pkgs.callPackage ../os-specific/darwin/apple-sdk/mk-stub.nix { }; in makeScopeWithSplicing' {