!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1199 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.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
19 May 2021
@grahamc:nixos.org@grahamc:nixos.org set the history visibility to "world_readable".19:22:35
@grahamc:nixos.org@grahamc:nixos.org changed the room name to "" from "".19:22:35
@0x4a6f:matrix.org[0x4A6F] joined the room.19:23:06
@nbardiuk:matrix.orgnazarii joined the room.19:24:29
@casey:hubns.netcasey © joined the room.19:27:39
@elvishjerricco:matrix.orgElvishJerricco joined the room.19:38:47
@andi:kack.itandi- joined the room.19:39:40
@stick:matrix.orgprusnak joined the room.19:46:16
@server_stats:nordgedanken.devServer Stats Discoverer (traveler bot) joined the room.19:50:54
@joerg:bethselamin.deMic92 joined the room.19:51:07
@voyager:t2bot.ioMatrix Traveler (bot) joined the room.20:03:59
@gaelans:matrix.orgGaelan Steele joined the room.20:16:00
@cgbrewster:matrix.orgcbrewster joined the room.20:17:23
@gaelans:matrix.orgGaelan Steele changed their display name from gaelans to Gaelan Steele.20:24:29
@gaelans:matrix.orgGaelan Steele set a profile picture.20:24:54
@gaelans:matrix.orgGaelan Steele changed their profile picture.20:24:59
@hobbit:nerdsin.spacenicolas joined the room.20:33:20
@risson:prologin.orgrisson joined the room.21:05:41
@evalexpr:matrix.orgevalexpr joined the room.21:10:43
@abathur:matrix.orgabathur joined the room.21:27:57
@emilazy:matrix.orgemily joined the room.21:46:41
@jacobfoard:matrix.orgJacob Foard joined the room.22:15:36
@atrius:matrix.orgmjlbach joined the room.23:14:48
20 May 2021
@sandro:supersandro.deSandro joined the room.00:06:31

Show newer messages


Back to Room ListRoom Version: 6