!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1175 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org192 Servers

Load older messages


SenderMessageTime
20 Mar 2026
@viraptor:tchncs.deviraptorIt's running in the background now, just in case...04:15:54
@anicolao:matrix.orgAlex Nicolaouwhich one? I have them racing each other at the moment.04:17:10
@viraptor:tchncs.deviraptorOpus 4.6 ultrathink04:19:29
@anicolao:matrix.orgAlex Nicolaouah so all three are competing. codex and gemini came up with similar plans ... we'll see how they do. I just approved them to try.04:22:12
@viraptor:tchncs.deviraptor I got a gnu/Darwin libiconv conflict and recommendation to override it explicitly for gettext. I guess I underestimated the thinking sand this time 04:29:33
@viraptor:tchncs.deviraptor * I got a gnu/Darwin libiconv conflict and recommendation to override it explicitly for libpsl. I guess I underestimated the thinking sand this time 04:37:41
@anicolao:matrix.orgAlex Nicolaouyes, but once that's fixed there is a follow on crash04:37:51
@anicolao:matrix.orgAlex Nicolaousome asset issue mumbo-jumbo that codex is workign on next. Gemini still doesn't have the initial issue done.04:38:33
@anicolao:matrix.orgAlex Nicolaounix is god's gift to the AI, it does well with it.04:39:22
@viraptor:tchncs.deviraptorYou can ignore the asset issues, that's one me and kind of the point of the PR. It will need some dev work.04:43:01
@viraptor:tchncs.deviraptor * 04:43:24
@anicolao:matrix.orgAlex Nicolaouah, well in that case do you want codex's patch? 04:43:47
@viraptor:tchncs.deviraptorSure. Let's see if it's the same thing I got.04:44:45
@anicolao:matrix.orgAlex Nicolaou
diff --git a/pkgs/applications/networking/p2p/transmission/4.nix b/pkgs/applications/networking/p2p/transmission/4.nix
index 77585c18484c..8382a0c7d52e 100644
--- a/pkgs/applications/networking/p2p/transmission/4.nix
+++ b/pkgs/applications/networking/p2p/transmission/4.nix
@@ -49,7 +49,7 @@
 }:
 
 let
-  inherit (lib) cmakeBool optional optionals;
+  inherit (lib) cmakeBool optional optionals optionalString;
 
   apparmorRules = apparmorRulesFromClosure { name = "transmission-daemon"; } (
     [
@@ -204,6 +204,17 @@ stdenv.mkDerivation (finalAttrs: {
     install -Dm0444 -t $out/share/icons ../icons/hicolor_apps_scalable_transmission.svg
   '';
 
+  postFixup = optionalString enableMac ''
+    # The macOS bundle fixup collapses different store paths that share the
+    # basename libiconv.2.dylib into a single bundled file. libintl is linked
+    # against Darwin libiconv's ABI (_iconv), while libpsl pulls GNU libiconv
+    # (_libiconv) into the closure. Point libintl back at the Darwin store path
+    # to avoid the basename collision inside the app bundle.
+    install_name_tool \
+      -change @rpath/libiconv.2.dylib ${libiconv}/lib/libiconv.2.dylib \
+      $out/Applications/Transmission.app/Contents/MacOS/libintl.8.dylib
+  '';
+
   passthru.tests = {
     apparmor = nixosTests.transmission_4; # starts the service with apparmor enabled
     smoke-test = nixosTests.bittorrent;

04:55:51
@anicolao:matrix.orgAlex Nicolaou

Here's Gemini's version, seems a bit longer (needlessly?)

--- gemini/transmission.nix.orig	2026-03-20 00:57:41
+++ gemini/transmission.nix	2026-03-20 00:55:01
@@ -25,6 +25,7 @@
   dht,
   libnatpmp,
   libiconv,
+  gettext,
   # Build options
   enableGTK3 ? false,
   gtkmm3,
@@ -111,7 +112,7 @@
     # Excluding gtest since it is hardcoded to vendored version. The rest of the listed libraries are not packaged.
     pushd third-party
     for f in *; do
-        if [[ ! $f =~ googletest|wildmat|wide-integer|jsonsl|madler-crcany ]]; then
+        if [[ ! $f =~ googletest|wildmat|wide-integer|jsonsl|madler-crcany|libutp|dht|natpmp ]]; then
             rm -r "$f"
         fi
     done
@@ -178,9 +179,12 @@
   ]
   ++ optionals enableSystemd [ systemd ]
   ++ optionals stdenv.hostPlatform.isLinux [ inotify-tools ]
-  ++ optionals enableMac [ libiconv ];
+  ++ optionals enableMac [ 
+    darwin.libiconv
+    gettext
+  ];
 
-  postInstall = optional stdenv.hostPlatform.isLinux ''
+  postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
     mkdir $apparmor
     cat >$apparmor/bin.transmission-daemon <<EOF
     abi <abi/4.0>,
@@ -202,6 +206,14 @@
     }
     EOF
     install -Dm0444 -t $out/share/icons ../icons/hicolor_apps_scalable_transmission.svg
+  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # The build system's bundling logic is flawed and picks up the wrong libiconv.
+    # We manually replace it with the Apple-compatible one from nixpkgs.
+    APP_MACOS="$out/Applications/Transmission.app/Contents/MacOS"
+    rm "$APP_MACOS/libiconv.2.dylib"
+    cp "${darwin.libiconv}/lib/libiconv.2.dylib" "$APP_MACOS/"
+    chmod +w "$APP_MACOS/libiconv.2.dylib"
+    install_name_tool -id "@rpath/libiconv.2.dylib" "$APP_MACOS/libiconv.2.dylib"
   '';
 
   passthru.tests = {

04:59:01
@viraptor:tchncs.deviraptorYeah, that works, thanks. Another step closer 😀 just need to fix "all the things" with resources now...07:45:36
@sarahec:matrix.orgSarah ClarkI know it's a long-shot, but is there a way to flag a package to nixpkgs-review as "run this by itself"? I'm tripping over review errors in Darwin that are due to the port conflict.17:28:02
@toonn:matrix.orgtoonn Is the `-p` flag not what you're looking for? 17:41:45
@toonn:matrix.orgtoonn Oh, you mean because of packages getting built simultaneously? 17:42:23
@sarahec:matrix.orgSarah ClarkThe latter17:50:05
@sarahec:matrix.orgSarah ClarkThere was a metadata trick at one point where one could say "build this with a less restrictive sandbox", though I've only seen it once in three years17:51:25
21 Mar 2026
@viraptor:tchncs.deviraptorHi could someone run the build for https://github.com/NixOS/nixpkgs/pull/501797 please? The bot reports an issue, but it works just fine for me. I'm not sure which side has a weird environment.20:43:48
@hexa:lossy.networkhexafyi https://github.com/NixOS/nixpkgs/pull/50206523:36:54
@glepage:matrix.orgGaétan Lepage

Good initiative!
(shouldn't we be using

badPlatforms = [
  "x86_64-darwin"
];

instead?)

23:40:48
@glepage:matrix.orgGaétan Lepage *

Good initiative!
(shouldn't we be using

badPlatforms = [
   # https://hydra.nixos.org/job/nixpkgs/unstable/arrow-cpp.x86_64-darwin/all
  "x86_64-darwin"
];

instead?)

23:40:59
@hexa:lossy.networkhexaremind me of the semantic difference?23:41:24
22 Mar 2026
@glepage:matrix.orgGaétan Lepage Very subtle, but the error message is slightly more helpful with badPlatforms. 00:05:11
@hexa:lossy.networkhexabadPlatforms say we know it can't be built on the target platform00:30:49
@hexa:lossy.networkhexabroken says we know it can be built, but it is broken right now and in need of fixing00:31:03
@hexa:lossy.networkhexae.g. firefox has 32bit as badPlatforms, because they can't allocate enough memory to successfully link00:31:40

There are no newer messages yet.


Back to Room ListRoom Version: 6