Native Mac Transmission GUI package?


I literally installed Nix few days ago and today I switched most of my system from Homebrew to Nix.
I’m using Darwin, Home-menager and Flakes. You can see my setup here: GitHub - MatejaMaric/nix-setup: My Nix Flake configuration
I installed the standard transmission package that supports aarch64-darwin since I have an M1 MacBook. It only provides the CLI tools without the GUI. I see that there are transmission-qt and transmission-gtk packages, but I assume that they are not the official native GUI client even tho they support aarch64-darwin. Is there some configuration option or something else that I’m missing to get the Native GUI client?

Thanks a lot!

transmission-qt and transmission-gtk are the same package except that they enable GUI at compilation time. This can easily be checked by different ways:

  1. first, on NixOS Search you can easily see that Homepage points to the same website for all these variants.
  2. then, if you are still unsure, you can see that the source link even points to the same file.
  3. to understand why, just can run in the Nixpkgs’s github repo:
$ cat pkgs/top-level/all-packages.nix | grep transmission -C 5
  transmission = callPackage ../applications/networking/p2p/transmission { };
  libtransmission = transmission.override {
    installLib = true;
    enableDaemon = false;
    enableCli = false;
  transmission-gtk = transmission.override { enableGTK3 = true; };
  transmission-qt = transmission.override { enableQt = true; };
  transmission_noSystemd = transmission.override { enableSystemd = false; };

  # Needs macOS >= 10.14.6
  transmission_4 = darwin.apple_sdk_11_0.callPackage ../applications/networking/p2p/transmission/4.nix {
    inherit (darwin.apple_sdk_11_0.frameworks) Foundation;
    fmt = fmt_9;
    libutp = libutp_3_4;
  libtransmission_4 = transmission_4.override {
    installLib = true;
    enableDaemon = false;
    enableCli = false;
  transmission_4-gtk = transmission_4.override { enableGTK3 = true; };
  transmission_4-qt = transmission_4.override { enableQt = true; };

and you can see that they are all the same derivation, with simply different compilation options.

Interesting, too bad there isn’t a compilation option for the Mac Native GUI version of Transmission.
From this line it would seem that transmission_4 package provides it, but sadly it only provides the CLI version.

# Needs macOS >= 10.14.6
transmission_4 = darwin.apple_sdk_11_0.callPackage ../applications/networking/p2p/transmission/4.nix {
  inherit (darwin.apple_sdk_11_0.frameworks) Foundation;
  fmt = fmt_9;
  libutp = libutp_3_4;

Never mind, thanks a lot for the answer!

  • |

Interesting, too bad there isn’t a compilation option for the Mac Native GUI version of Transmission.

I don’t use a mac, but how is the Qt GUI version different from the Mac Native version?

If you open the transmission_4 derivation file, you can see a line:

"-DENABLE_MAC=OFF" # requires xcodebuild

so I guess that the package does not package the mac native interface as it is more complicated to be compatible with XCodeBuild, I guess because of licensing reasons. The documentation mentions:

Since Xcode can’t be packaged with Nix, nor we can publish it as a Nix package (because of its license) this is basically the only integration strategy making it possible to do iOS application builds that integrate with other components of the Nix ecosystem

Yet, the documentation mentions here that it is possible to build applications for IOs, involving xcode, and this part of the documentation mentions:

The package xcbuild can be used to build projects that really depend on Xcode. However, this
replacement is not 100% compatible with Xcode and can occasionally cause issues.

The doc also mentions here:

xcbuildHook: Overrides the build and install phases to run the “xcbuild” command. This hook is needed when a project only comes with build files for the XCode build system. You can disable this behavior by setting buildPhase and configurePhase to a custom value. xcbuildFlags controls flags passed only to xcbuild.

While browsing the source with rg xcode, I also found many references to:

  • xcodebuild which seems to be more or less equal to xcbuild, see for instance pkgs/os-specific/darwin/apple-sdk-11.0/default.nix
  • xcode and many related packages like xcode_14_1… in pkgs/os-specific/darwin/xcode/default.nix
  • apple_sdk which seems to contain internally xcodebuild
  • some packages seem to directly hardcode the path to /usr/bin/xcodebuild in the build phase like in pkgs/development/tools/swiftformat/default.nix, so I guess it is another way to support xcode? But in that case this derivation mentions “This derivation is impure: it relies on an Xcode toolchain being installed and available in the expected place. The values of sandboxProfile and hydraPlatforms are copied pretty directly from the MacVim derivation, which is also impure.”. This is also the case of MacVim (whose name sounds like it should use native Mac GUI) in pkgs/applications/editors/vim/macvim.nix if you want to grab more inspirations.

and there are many applications that rely on xcbuild:

$ rg xcbuild

13:, xcbuild

37:, xcbuild
103:    ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle fixDarwinDylibNames xcbuild ];

5:, xcbuild
28:    xcbuild

21:, xcbuild
158:  ++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun sigtool ]

12:, xcbuild

14:, xcbuild
68:  ] ++ lib.optionals stdenv.isDarwin [ xcbuild ];

13:, xcbuild
35:  ++ lib.optionals stdenv.isDarwin [ xcbuild ];


so I guess native Mac GUI it is a relatively well supported use case that might only require a ++ lib.optionals stdenv.isDarwin [ xcbuild ]; to work… but since I know nothing about MacOs and have no Mac to test, I can’t say much more. But feel free to try to adapt the package, and ask for more help here or on the Nix on MacOs matrix channel. If you don’t want to spend time on this, you can also just fill a bug report.

Here’s the GTK version:

Here’s the QT version:

And here’s the native Mac version:

They all have the same functionality, I just find the native Mac version to be lightly prettier, probably because I’m used to it… :sweat_smile:

Thanks a lot for the information. Maybe I’ll try to adapt it as a learning exercise :smiley: