Skip to content

treewide: remove usage of deprecated apple_sdk frameworks#398707

Merged
emilazy merged 1 commit intoNixOS:stagingfrom
booxter:auto-remove-apple-frameworks
Apr 20, 2025
Merged

treewide: remove usage of deprecated apple_sdk frameworks#398707
emilazy merged 1 commit intoNixOS:stagingfrom
booxter:auto-remove-apple-frameworks

Conversation

@booxter
Copy link
Contributor

@booxter booxter commented Apr 14, 2025

They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka ihar.hrachyshka@gmail.com

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: emacs Text editor 6.topic: printing Drivers, CUPS & Co. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: vim Advanced text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: java Including JDK, tooling, other languages, other VMs 6.topic: R R is a programming language for statistical computing and data visualization. 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 6.topic: games Gaming on NixOS 6.topic: php PHP is a general-purpose scripting language geared towards web development. 6.topic: dotnet Language: .NET 6.topic: tcl Dynamic, multi-paradigm programming language 8.has: documentation This PR adds or changes documentation labels Apr 14, 2025
@booxter booxter force-pushed the auto-remove-apple-frameworks branch 2 times, most recently from 83a4e3c to bf73b17 Compare April 14, 2025 23:42
@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 14, 2025
@emilazy
Copy link
Member

emilazy commented Apr 15, 2025

(I hope to review mechanically this week. Thanks for this!)

@booxter booxter marked this pull request as ready for review April 15, 2025 00:14
@booxter booxter force-pushed the auto-remove-apple-frameworks branch 2 times, most recently from 5345631 to 24b0967 Compare April 15, 2025 13:01
@emilazy
Copy link
Member

emilazy commented Apr 20, 2025

Okay, here‘s the testing methodology. We do a horrible hack to stdenv.mkDerivation to ”modulo out” the stub packages:

diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index 8ecdb68797..233f215356 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -18,6 +18,7 @@
     extendDerivation
     filter
     findFirst
+    genAttrs
     getDev
     head
     imap1
@@ -84,9 +85,27 @@
       # separate lines, because Nix would only show the last line of the comment.
 
       # An infinite recursion here can be caused by having the attribute names of expression `e` in `.overrideAttrs(finalAttrs: previousAttrs: e)` depend on `finalAttrs`. Only the attribute values of `e` can depend on `finalAttrs`.
-      args = rattrs (args // { inherit finalPackage overrideAttrs; });
+      args = rattrs (scrub args // { inherit finalPackage overrideAttrs; });
       #              ^^^^
 
+      scrub =
+        args:
+        args
+        // genAttrs (filter (name: args ? ${name}) [
+          "depsBuildBuild"
+          "nativeBuildInputs"
+          "depsBuildTarget"
+          "depsHostHost"
+          "buildInputs"
+          "depsTargetTarget"
+          "depsBuildBuildPropagated"
+          "propagatedNativeBuildInputs"
+          "depsBuildTargetPropagated"
+          "depsHostHostPropagated"
+          "propagatedBuildInputs"
+          "depsTargetTargetPropagated"
+        ]) (name: removeDarwinStubs args.${name});
+
       overrideAttrs = f0: makeDerivationExtensible (lib.extends (lib.toExtension f0) rattrs);
 
       finalPackage = mkDerivationSimple overrideAttrs args;
@@ -190,6 +209,21 @@
       allowedRequisites = mapNullable unsafeDerivationToUntrackedOutpath attrs.allowedRequisites;
     };
 
+  removeDarwinStubs =
+    deps:
+    filter (x: x.isDarwinCompatStub or false == false) (
+      map (
+        x:
+        if isList x then
+          let
+            filtered = removeDarwinStubs x;
+          in
+          if x != [ ] && filtered == [ ] then { isDarwinCompatStub = true; } else filtered
+        else
+          x
+      ) deps
+    );
+
   makeDerivationArgument =
 
     # `makeDerivationArgument` is responsible for the `mkDerivation` arguments that
@@ -384,7 +418,7 @@
 
         outputs = outputs';
 
-        dependencies = [
+        dependencies = map (map removeDarwinStubs) [
           [
             (map (drv: getDev drv.__spliced.buildBuild or drv) (
               checkDependencyList "depsBuildBuild" depsBuildBuild
@@ -406,7 +440,7 @@
             ))
           ]
         ];
-        propagatedDependencies = [
+        propagatedDependencies = map (map removeDarwinStubs) [
           [
             (map (drv: getDev drv.__spliced.buildBuild or drv) (
               checkDependencyList "depsBuildBuildPropagated" depsBuildBuildPropagated

and then compare the evaluation outpaths of the base commit + this hack against the head commit + this hack.

That uncovered the following required fixes to reduce unintentional rebuilds and avoid introducing new packaging bugs:

diff --git a/pkgs/by-name/ma/maturin/package.nix b/pkgs/by-name/ma/maturin/package.nix
index 08141f1313..c9f694e68c 100644
--- a/pkgs/by-name/ma/maturin/package.nix
+++ b/pkgs/by-name/ma/maturin/package.nix
@@ -1,8 +1,10 @@
 {
   lib,
+  stdenv,
   fetchFromGitHub,
   rustPlatform,
   fetchpatch,
+  libiconv,
   testers,
   nix-update-script,
   maturin,
@@ -33,6 +35,10 @@
     })
   ];
 
+  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
+    libiconv
+  ];
+
   # Requires network access, fails in sandbox.
   doCheck = false;
 
diff --git a/pkgs/development/libraries/libuiohook/default.nix b/pkgs/development/libraries/libuiohook/default.nix
index b75992207d..709e75bc8e 100644
--- a/pkgs/development/libraries/libuiohook/default.nix
+++ b/pkgs/development/libraries/libuiohook/default.nix
@@ -27,8 +27,8 @@
     pkg-config
   ];
 
-  buildInputs =
-    lib.optionals (!stdenv.hostPlatform.isDarwin) [
+  buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) (
+    [
       libX11
       libxkbcommon
       xinput
@@ -42,7 +42,8 @@
       libXtst
       libXext
       libxkbfile
-    ]);
+    ])
+  );
 
   outputs = [
     "out"
diff --git a/pkgs/development/php-packages/datadog_trace/default.nix b/pkgs/development/php-packages/datadog_trace/default.nix
index 15a1163695..22aa2565e9 100644
--- a/pkgs/development/php-packages/datadog_trace/default.nix
+++ b/pkgs/development/php-packages/datadog_trace/default.nix
@@ -35,8 +35,6 @@
     [
       cargo
       rustc
-    ]
-    ++ lib.optionals stdenv.hostPlatform.isLinux [
       rustPlatform.bindgenHook
       rustPlatform.cargoSetupHook
     ];

But other than that it looks good. Here‘s the outpaths diff after all is said and done:

--- result-before/outpaths.json	1970-01-01 00:00:01.000000000 +0000
+++ result-after/outpaths.json	1970-01-01 00:00:01.000000000 +0000
@@ -57359,28 +57359,28 @@
     "out": "/nix/store/gjy7agr7nfpd4inslqslaaqm4g7gpb3b-ap-reflect-0.3"
   },
   "haskellPackages.apecs-gloss.aarch64-darwin": {
-    "doc": "/nix/store/950pqv5ycm9d3wyxsy57ga1rva40hqyy-apecs-gloss-0.2.4-doc",
-    "out": "/nix/store/kxxg1vgr2rz1d5mh2f0sqal4w5nprbhc-apecs-gloss-0.2.4"
+    "doc": "/nix/store/k1awxvdndrl8z2rnv5c2qvh2f3qqnssh-apecs-gloss-0.2.4-doc",
+    "out": "/nix/store/v59f2bjmkyylk3q6sia93k3jld3kn89m-apecs-gloss-0.2.4"
   },
   "haskellPackages.apecs-gloss.x86_64-darwin": {
-    "doc": "/nix/store/cc31lfx9hwr6mhfmmzcckqp5q841hry6-apecs-gloss-0.2.4-doc",
-    "out": "/nix/store/dh0y4whmdwdbvk3l5mbmkiwk7lmrdza0-apecs-gloss-0.2.4"
+    "doc": "/nix/store/gdljhrn50kncd67vx20yq8x2dh6baa2j-apecs-gloss-0.2.4-doc",
+    "out": "/nix/store/5aq9iwm0a0wkxmb90cng66b0dkx0mwm1-apecs-gloss-0.2.4"
   },
   "haskellPackages.apecs-physics-gloss.aarch64-darwin": {
-    "doc": "/nix/store/8c69kpr66v36qj6xncw896idgacqm3ca-apecs-physics-gloss-0.1.0.0-doc",
-    "out": "/nix/store/10igmcvr5iazcj9a669gwac748dv0pni-apecs-physics-gloss-0.1.0.0"
+    "doc": "/nix/store/ih7qq3a8vsixcr7vp3nb8my3j9ywcafm-apecs-physics-gloss-0.1.0.0-doc",
+    "out": "/nix/store/4lchvq6jrsl9dq4s3v6j7gn1w3ziywb1-apecs-physics-gloss-0.1.0.0"
   },
   "haskellPackages.apecs-physics-gloss.x86_64-darwin": {
-    "doc": "/nix/store/sbflkkf1hhv043w25q20g522vgnixa5k-apecs-physics-gloss-0.1.0.0-doc",
-    "out": "/nix/store/b4dv4ggpnrxi1sx97dqlhwyv1f3rppai-apecs-physics-gloss-0.1.0.0"
+    "doc": "/nix/store/y87zdxydjbf6m92hy89cghmxxdq0bzbv-apecs-physics-gloss-0.1.0.0-doc",
+    "out": "/nix/store/90igk38rclgibkdjdkjbc2h3j6ylrnzx-apecs-physics-gloss-0.1.0.0"
   },
   "haskellPackages.apecs-physics.aarch64-darwin": {
-    "doc": "/nix/store/6j2kyc3w9ch6128wn5dmfrrp3zbri02p-apecs-physics-0.4.6-doc",
-    "out": "/nix/store/salp0wwvjbq2six55wazdv84dp00sf8q-apecs-physics-0.4.6"
+    "doc": "/nix/store/y7j24an8y8f2cpgqi7i5nfwxxvj8f7j6-apecs-physics-0.4.6-doc",
+    "out": "/nix/store/5hfmyzfrxmhcf7vpxrw39ian7g5nhams-apecs-physics-0.4.6"
   },
   "haskellPackages.apecs-physics.x86_64-darwin": {
-    "doc": "/nix/store/0qsv7w5jagy7n4nyvdpqf84qd5h8dw9h-apecs-physics-0.4.6-doc",
-    "out": "/nix/store/a7k93nalkxffpkg3gzwy2px09mxgm9my-apecs-physics-0.4.6"
+    "doc": "/nix/store/gvmjqpawkrvj891fsspsfcb914x6vs1v-apecs-physics-0.4.6-doc",
+    "out": "/nix/store/j50pw17hmav4lg8gbvk6l18sqimviyh8-apecs-physics-0.4.6"
   },
   "haskellPackages.apecs-stm.aarch64-darwin": {
     "doc": "/nix/store/k3nicirzbf3ap99dr51qsiylmc8kf9qq-apecs-stm-0.2-doc",
@@ -109549,10 +109549,10 @@
     "out": "/nix/store/8lr1j31p8mcmrwwqjj9scbmi5pfmmnz1-jama-1.2.5"
   },
   "jameica.aarch64-darwin": {
-    "out": "/nix/store/mwcykf9wvm0lcgjyighswgc9yrqkcmpw-jameica-2.10.4-487"
+    "out": "/nix/store/70qv7lm878b3pa0131y7lb16m3imf8a3-jameica-2.10.4-487"
   },
   "jameica.x86_64-darwin": {
-    "out": "/nix/store/msvn005x9mfj0143gbbyi10zjp0b0a51-jameica-2.10.4-487"
+    "out": "/nix/store/zg8479vx67g04v1lwwb84ac0pnqbr7n2-jameica-2.10.4-487"
   },
   "janet.aarch64-darwin": {
     "out": "/nix/store/mk94150fffv9qa0wv6raiark7mwygwlc-janet-1.38.0"
@@ -117204,6 +117204,12 @@
     "dev": "/nix/store/1kmc218mbjz0fdcaq4chz4cdwmn9pycx-libfreeaptx-0.2.2-dev",
     "out": "/nix/store/f089y8c568yli69rj58xd22sq5gz9gy7-libfreeaptx-0.2.2"
   },
+  "libfreefare.aarch64-darwin": {
+    "out": "/nix/store/sdrjy8mh3ml5qgq7fznfqm6jfqby6y5r-libfreefare-0.4.0"
+  },
+  "libfreefare.x86_64-darwin": {
+    "out": "/nix/store/svyn2d0y0rsi8gw2hj7wjyi80j1x836p-libfreefare-0.4.0"
+  },
   "libfsm.aarch64-darwin": {
     "dev": "/nix/store/iivikzsb22q3jkxv8ng31kiijrv9vv29-libfsm-0.1pre2987_087e3389-dev",
     "lib": "/nix/store/mhw70fhzl27kpg7x8jr9n8nbsamakycg-libfsm-0.1pre2987_087e3389-lib",
@@ -123881,12 +123887,6 @@
     "man": "/nix/store/7vnjlnz4mbb76c3ljsbparxadjs086w1-lix-2.91.1-man",
     "out": "/nix/store/zc6xbjx0xlq9sjr933vfiny0xcqc8sfh-lix-2.91.1"
   },
-  "lixPackageSets.latest.Security.aarch64-darwin": {
-    "out": "/nix/store/nw915zsclxd2dl69963knh3cv9dxdhfy-Security-11.0"
-  },
-  "lixPackageSets.latest.Security.x86_64-darwin": {
-    "out": "/nix/store/i56x39rxzmvnp1791va28fddb4gjcz5a-Security-11.0"
-  },
   "lixPackageSets.latest.aws-sdk-cpp.aarch64-darwin": {
     "dev": "/nix/store/fhr6vfi0xsv55z421knc438dhydmgi5k-aws-sdk-cpp-1.11.448-dev",
     "out": "/nix/store/azpbyq4hgb6wdzdkxibb29ncln1cpyi6-aws-sdk-cpp-1.11.448"
@@ -123937,12 +123937,6 @@
   "lixPackageSets.latest.nix-eval-jobs.x86_64-darwin": {
     "out": "/nix/store/qa30pcyk9syk1gwkpwn0pi7jnyw7dhsm-nix-eval-jobs-2.92.0"
   },
-  "lixPackageSets.lix_2_90.Security.aarch64-darwin": {
-    "out": "/nix/store/nw915zsclxd2dl69963knh3cv9dxdhfy-Security-11.0"
-  },
-  "lixPackageSets.lix_2_90.Security.x86_64-darwin": {
-    "out": "/nix/store/i56x39rxzmvnp1791va28fddb4gjcz5a-Security-11.0"
-  },
   "lixPackageSets.lix_2_90.aws-sdk-cpp.aarch64-darwin": {
     "dev": "/nix/store/fhr6vfi0xsv55z421knc438dhydmgi5k-aws-sdk-cpp-1.11.448-dev",
     "out": "/nix/store/azpbyq4hgb6wdzdkxibb29ncln1cpyi6-aws-sdk-cpp-1.11.448"
@@ -123993,12 +123987,6 @@
   "lixPackageSets.lix_2_90.nix-eval-jobs.x86_64-darwin": {
     "out": "/nix/store/3b2361f7l86hfmdzgd3zfhxnyln0i828-nix-eval-jobs-2.90.0"
   },
-  "lixPackageSets.lix_2_91.Security.aarch64-darwin": {
-    "out": "/nix/store/nw915zsclxd2dl69963knh3cv9dxdhfy-Security-11.0"
-  },
-  "lixPackageSets.lix_2_91.Security.x86_64-darwin": {
-    "out": "/nix/store/i56x39rxzmvnp1791va28fddb4gjcz5a-Security-11.0"
-  },
   "lixPackageSets.lix_2_91.aws-sdk-cpp.aarch64-darwin": {
     "dev": "/nix/store/fhr6vfi0xsv55z421knc438dhydmgi5k-aws-sdk-cpp-1.11.448-dev",
     "out": "/nix/store/azpbyq4hgb6wdzdkxibb29ncln1cpyi6-aws-sdk-cpp-1.11.448"
@@ -124049,12 +124037,6 @@
   "lixPackageSets.lix_2_91.nix-eval-jobs.x86_64-darwin": {
     "out": "/nix/store/9x0f8vqywjvv6941r4fjk1g4zkxyvaym-nix-eval-jobs-2.91.0"
   },
-  "lixPackageSets.lix_2_92.Security.aarch64-darwin": {
-    "out": "/nix/store/nw915zsclxd2dl69963knh3cv9dxdhfy-Security-11.0"
-  },
-  "lixPackageSets.lix_2_92.Security.x86_64-darwin": {
-    "out": "/nix/store/i56x39rxzmvnp1791va28fddb4gjcz5a-Security-11.0"
-  },
   "lixPackageSets.lix_2_92.aws-sdk-cpp.aarch64-darwin": {
     "dev": "/nix/store/fhr6vfi0xsv55z421knc438dhydmgi5k-aws-sdk-cpp-1.11.448-dev",
     "out": "/nix/store/azpbyq4hgb6wdzdkxibb29ncln1cpyi6-aws-sdk-cpp-1.11.448"
@@ -124105,12 +124087,6 @@
   "lixPackageSets.lix_2_92.nix-eval-jobs.x86_64-darwin": {
     "out": "/nix/store/qa30pcyk9syk1gwkpwn0pi7jnyw7dhsm-nix-eval-jobs-2.92.0"
   },
-  "lixPackageSets.stable.Security.aarch64-darwin": {
-    "out": "/nix/store/nw915zsclxd2dl69963knh3cv9dxdhfy-Security-11.0"
-  },
-  "lixPackageSets.stable.Security.x86_64-darwin": {
-    "out": "/nix/store/i56x39rxzmvnp1791va28fddb4gjcz5a-Security-11.0"
-  },
   "lixPackageSets.stable.aws-sdk-cpp.aarch64-darwin": {
     "dev": "/nix/store/fhr6vfi0xsv55z421knc438dhydmgi5k-aws-sdk-cpp-1.11.448-dev",
     "out": "/nix/store/azpbyq4hgb6wdzdkxibb29ncln1cpyi6-aws-sdk-cpp-1.11.448"
@@ -133260,10 +133236,10 @@
     "out": "/nix/store/7vr3nk9bm2rhlmyr2k6ipr9fn7rah032-luabridge-2.8"
   },
   "luaformatter.aarch64-darwin": {
-    "out": "/nix/store/zpzmmwfc1s1py81yyjfafmk9w3n087g0-luaformatter-1.3.6"
+    "out": "/nix/store/8fi5i31i0jyarkhgd955aw5fbw7lpnwv-luaformatter-1.3.6"
   },
   "luaformatter.x86_64-darwin": {
-    "out": "/nix/store/d37z0fyy5djm3z3xqa8fiyncnm8l3k64-luaformatter-1.3.6"
+    "out": "/nix/store/s3mjbmx69rapcc5cxigpkqbs0jhqag07-luaformatter-1.3.6"
   },
   "luajit.aarch64-darwin": {
     "out": "/nix/store/9vvdnw9cip644kdfg27yzmy7svfqcgaw-luajit-2.1.1741730670"
@@ -144287,10 +144263,10 @@
     "out": "/nix/store/8l5rrg3fpacngj452kii66bm11mg0z82-nixpkgs-lint-1"
   },
   "nixpkgs-manual.aarch64-darwin": {
-    "out": "/nix/store/b90yhglv2l5b19fijcsqy3s452lal6hg-nixpkgs-manual"
+    "out": "/nix/store/jvnib9n76abkid7a7afg2388yh8apcah-nixpkgs-manual"
   },
   "nixpkgs-manual.x86_64-darwin": {
-    "out": "/nix/store/jxal4ri1g6p8paib00cpslcf9jqkvlb0-nixpkgs-manual"
+    "out": "/nix/store/zam99v680pvxm5cjswwshmwsmxkgnpal-nixpkgs-manual"
   },
   "nixpkgs-openjdk-updater.aarch64-darwin": {
     "dist": "/nix/store/8k9jbsga3n1k3nfsfa2ajdqpihcrg0wn-nixpkgs-openjdk-updater-0.1.0-dist",
@@ -238312,20 +238288,20 @@
     "out": "/nix/store/bdbmygg1pnpykmkqnlxhahb4mi3jn7rq-python3.12-pygal-3.0.5"
   },
   "python312Packages.pygame-ce.aarch64-darwin": {
-    "dist": "/nix/store/kmw1ziimwlshx9nsl1cspn7yqmjgazla-python3.12-pygame-ce-2.5.3-dist",
-    "out": "/nix/store/p3rcg8xmhllm4bawl82x4kyvv71pddn3-python3.12-pygame-ce-2.5.3"
+    "dist": "/nix/store/bvy00jls0jxj4j7x0qaglj4g01r94r05-python3.12-pygame-ce-2.5.3-dist",
+    "out": "/nix/store/cd5vzf646hl1i3s5hc678cn6i73xcg3r-python3.12-pygame-ce-2.5.3"
   },
   "python312Packages.pygame-ce.x86_64-darwin": {
-    "dist": "/nix/store/z06snmg20jkjgwwyhyz3swlf5jrj6fm8-python3.12-pygame-ce-2.5.3-dist",
-    "out": "/nix/store/hppxbqd9n6hgjnv48xhssrigqp9sj3sq-python3.12-pygame-ce-2.5.3"
+    "dist": "/nix/store/iibasdjm218na01p715m33wnrplhskpq-python3.12-pygame-ce-2.5.3-dist",
+    "out": "/nix/store/5gbj41v464xf9vjini16a461h3s90al0-python3.12-pygame-ce-2.5.3"
   },
   "python312Packages.pygame-gui.aarch64-darwin": {
-    "dist": "/nix/store/w9vrfv8n83hm2wbczrdmg3xggy06i69b-python3.12-pygame-gui-0613-dist",
-    "out": "/nix/store/9wvd11x2dkj6y3v6z1i5zz250mwf6sxz-python3.12-pygame-gui-0613"
+    "dist": "/nix/store/hykwvjpjpaijwkgdfhc76v3cxz1s0ary-python3.12-pygame-gui-0613-dist",
+    "out": "/nix/store/1ng0b26crj03p4mgf33j1a3g638q296i-python3.12-pygame-gui-0613"
   },
   "python312Packages.pygame-gui.x86_64-darwin": {
-    "dist": "/nix/store/9qxhqf4hz6a2nd2vhs4ms7mx8nphpprl-python3.12-pygame-gui-0613-dist",
-    "out": "/nix/store/q21x25w6h7bdfxv6wjklhl3n7n5qpgy6-python3.12-pygame-gui-0613"
+    "dist": "/nix/store/8rqd39acppdfhzv8wbxk7xky08cxri5f-python3.12-pygame-gui-0613-dist",
+    "out": "/nix/store/6k8k14k1b3wljfm0b4a7a6622ydskzk9-python3.12-pygame-gui-0613"
   },
   "python312Packages.pygame-sdl2.aarch64-darwin": {
     "dist": "/nix/store/fsvsjglhd69nzmjhl1pd9z7xcnmjwcz5-python3.12-pygame-sdl2-8.3.7.25031702-dist",
@@ -308273,20 +308249,20 @@
     "out": "/nix/store/7w6sqnpljl2rvhs3m5c7cfmdgyl0a8b4-python3.13-pygal-3.0.5"
   },
   "python313Packages.pygame-ce.aarch64-darwin": {
-    "dist": "/nix/store/sgbnysxlng611j230y2mi6cqjbrkckj4-python3.13-pygame-ce-2.5.3-dist",
-    "out": "/nix/store/7g15gmgywgh6i3xm40yigaspm8wff340-python3.13-pygame-ce-2.5.3"
+    "dist": "/nix/store/4s44nbvml7ynvwh0dlh3p5kb2fj534b7-python3.13-pygame-ce-2.5.3-dist",
+    "out": "/nix/store/dsrwqwa99za1sd5kbwd36xh3vjdvd601-python3.13-pygame-ce-2.5.3"
   },
   "python313Packages.pygame-ce.x86_64-darwin": {
-    "dist": "/nix/store/037wqavarljcxlf1avav95pq38zgg034-python3.13-pygame-ce-2.5.3-dist",
-    "out": "/nix/store/h0gqylr4f7ln9v2hl231kad8idgsps18-python3.13-pygame-ce-2.5.3"
+    "dist": "/nix/store/4jvjkcclbg9z8x7l2vywr2jnb1alq0qj-python3.13-pygame-ce-2.5.3-dist",
+    "out": "/nix/store/vn3m6fp9rs8gxh4y9icqqdh9xghrcnia-python3.13-pygame-ce-2.5.3"
   },
   "python313Packages.pygame-gui.aarch64-darwin": {
-    "dist": "/nix/store/i9y4qpiix7a08128y379fvzm1pbj44fi-python3.13-pygame-gui-0613-dist",
-    "out": "/nix/store/ky8yr7f8m08rzdm9dn1bdjayww8xy0i0-python3.13-pygame-gui-0613"
+    "dist": "/nix/store/ma4s3qnjapc0slqn696552dlmm3ws605-python3.13-pygame-gui-0613-dist",
+    "out": "/nix/store/l4kwi73rp0h7544z7yr3a0fgplwi6gif-python3.13-pygame-gui-0613"
   },
   "python313Packages.pygame-gui.x86_64-darwin": {
-    "dist": "/nix/store/0aplnhsc9i3fihhzplchlaqr08jj5y1b-python3.13-pygame-gui-0613-dist",
-    "out": "/nix/store/if1nga867lrrd8gns7d3bpxds1qz9qm9-python3.13-pygame-gui-0613"
+    "dist": "/nix/store/46dw9nrv17qq1hgqww775c85am91810v-python3.13-pygame-gui-0613-dist",
+    "out": "/nix/store/drkfxwc3gd8agx3rpilq4972jvwqq05g-python3.13-pygame-gui-0613"
   },
   "python313Packages.pygame-sdl2.aarch64-darwin": {
     "dist": "/nix/store/c58m2b7gn9wa6z34hmpnv63fa96fdlk8-python3.13-pygame-sdl2-8.3.7.25031702-dist",
@@ -338530,7 +338506,7 @@
     "out": "/nix/store/f674n4sq8jgwzk7sipcqbq1gysgjsiav-rekor-server-1.3.10"
   },
   "release-checks": {
-    "out": "/nix/store/8p62z1w2nhn9kfwvli8kv8y58p35xrkz-nixpkgs-release-checks"
+    "out": "/nix/store/izym3702akkiwlkrsk2zx6hcnry2cjr4-nixpkgs-release-checks"
   },
   "release-plz.aarch64-darwin": {
     "out": "/nix/store/csfixwwp75j277mid9q3wmss6n3ks34c-release-plz-0.3.132"

The Haskell stuff is because

-    apecs-physics = addPkgconfigDepends [
-      darwin.apple_sdk.frameworks.ApplicationServices
-    ] super.apecs-physics;

drops a pkg-config dependency that shouldn‘t have been there in the first place.

libfreefare was broken before due to using darwin.apple_sdk as a package and is fixed by the PR.

jameica and python3Packages.pygame-ce do terrifying things with rec and buildInputs that my hack can’t scrub; python3Packages.pygame-gui is downstream of that.

Security disappearing from the Lix package set is expected, as are changes to the manual and release checks hashes.

luaformatter is some strange thing where my hack is leaving a space at the start of buildInputs when CoreFoundation is present in the antlr4_9.cpp derivation. Doesn’t seem worth the time to investigate why given the general success of this approach.

Once you squash my fixes in I’m happy to merge this (after comparing the evaluation results to make sure nothing new comes up, if this needs rebasing before then).

They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
@booxter booxter force-pushed the auto-remove-apple-frameworks branch from 4c3d191 to dd0f03a Compare April 20, 2025 00:28
@emilazy emilazy merged commit b59337b into NixOS:staging Apr 20, 2025
23 of 27 checks passed
@emilazy
Copy link
Member

emilazy commented Apr 20, 2025

Thanks again!

I’ll look at the pending split‐out PRs tomorrow, then clean up any references to stubs this didn’t handle and move them to the aliases file with a warning. That should have us set for 25.05.

This is probably going to be a bit awkward with masterstaging merges, but I’ll try to handle those as they come up.

emilazy added a commit to emilazy/nixpkgs that referenced this pull request Apr 20, 2025
This was done with booxter’s fantastic [nix-clean-apple_sdk] tool,
simply modified to look for `libobjc` rather than the existing list he
already used in <NixOS#398707>. Some
manual work was applied, including cleaning up a string interpolation
in the terrifying MacVim derivation, stray comments, empty lists,
function parameters, and `inherit`s, including all of the references in
`all-packages.nix`.

[nix-clean-apple_sdk]: https://github.com/booxter/nix-clean-apple_sdk
@0xda157 0xda157 mentioned this pull request Apr 21, 2025
13 tasks
emilazy added a commit to emilazy/nixpkgs that referenced this pull request Apr 21, 2025
This was done with booxter’s fantastic [nix-clean-apple_sdk] tool,
simply modified to look for `libobjc` rather than the existing list he
already used in <NixOS#398707>. Some
manual work was applied, including cleaning up a string interpolation
in the terrifying MacVim derivation, stray comments, empty lists,
function parameters, and `inherit`s, including all of the references in
`all-packages.nix`.

[nix-clean-apple_sdk]: https://github.com/booxter/nix-clean-apple_sdk
@Defelo Defelo mentioned this pull request May 6, 2025
16 tasks
corngood added a commit to corngood/nixpkgs that referenced this pull request May 22, 2025
This dependency seems to have been removed accidentally along with the
framework dependencies in NixOS#398707, so the test has been broken since
then.

Fixes: dd0f03a
nixpkgs-ci bot pushed a commit that referenced this pull request May 23, 2025
This dependency seems to have been removed accidentally along with the
framework dependencies in #398707, so the test has been broken since
then.

Fixes: dd0f03a
(cherry picked from commit b0fd9b0)
jfroche added a commit to supabase/postgres that referenced this pull request Jul 21, 2025
Backport upstream commit to remove the deprecated darwin framework: NixOS/nixpkgs#398707
jfroche added a commit to supabase/postgres that referenced this pull request Jul 21, 2025
Backport upstream commit to remove the deprecated darwin framework: NixOS/nixpkgs#398707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: dotnet Language: .NET 6.topic: emacs Text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: games Gaming on NixOS 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: java Including JDK, tooling, other languages, other VMs 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: php PHP is a general-purpose scripting language geared towards web development. 6.topic: printing Drivers, CUPS & Co. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: R R is a programming language for statistical computing and data visualization. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: tcl Dynamic, multi-paradigm programming language 6.topic: vim Advanced text editor 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[enhancement] Cleanup Darwin-related stuff from Emacs derivation

2 participants