!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
20 Mar 2026
@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
23 Mar 2026
@hexa:lossy.networkhexa @Ihar Hrachyshka I've reached out to the board to figure out buying chonky m4 or even better m5 mac minis with ~2 GB RAM and 512 GB disk 01:21:59
@hexa:lossy.networkhexa @Ihar Hrachyshka I've reached out to the board to figure out buying chonky m4 or even better m5 mac minis with 32 GB RAM and 512 GB disk 01:22:03
@k900:0upti.meK900https://github.com/NixOS/nixpkgs/pull/50268015:24:54
@k900:0upti.meK900Any Qt enjoyers want to test this15:24:58
@k900:0upti.meK900Should build on top of master15:25:02
@k900:0upti.meK900(hopefully)15:25:15
@hoyhoy_:matrix.org@hoyhoy joined the room.18:06:46
@hoyhoy_:matrix.org@hoyhoyI have brave installed via nix-darwin, but it wants to update itself from v1.88.132 to v1.88.134, but then reports that it can’t update itself because it’s managed. The problem is it continually keeps redownloading v1.88.134 every time it opens. Is there some way to force a rebuild update? Or to disable Automatically updating in Brave itself? Or should I just revert back to self-managed Brave?18:09:24
@mall0c:matrix.orgmall0cdoes anybody know the differences between sandbox on aarch64/x86_64-linux and darwin systems?22:04:01
24 Mar 2026
@oscarvarto:matrix.orgOscar Vargas Torres joined the room.01:13:06
@oscarvarto:matrix.orgOscar Vargas TorresHi there! Anyone experiencing direnv build failing? This is a dependency of mise, and it's currently failing to build for me.01:14:46
@oscarvarto:matrix.orgOscar Vargas Torres

Any workaround besides pinning:

nixpkgs.url = "github:nixos/nixpkgs/9cf7092bdd603554bd8b63c216e8943cf9b12512"; # pin: direnv 2.37.1 cgo breakage on newer unstable
01:15:52

Show newer messages


Back to Room ListRoom Version: 6