From 16ce51d8e5e7633dd55d851930eb61c85d4a43e4 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:14:58 +0100 Subject: [PATCH 1/2] libtorrent-rasterbar-2_0_x: unbreak on darwin --- pkgs/development/libraries/libtorrent-rasterbar/default.nix | 1 - pkgs/top-level/all-packages.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix index d4812c6f0823..5efd3a5c3c7a 100644 --- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix +++ b/pkgs/development/libraries/libtorrent-rasterbar/default.nix @@ -49,7 +49,6 @@ in stdenv.mkDerivation { ]; meta = with lib; { - broken = stdenv.isDarwin; homepage = "https://libtorrent.org/"; description = "A C++ BitTorrent implementation focusing on efficiency and scalability"; license = licenses.bsd3; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 104f8eef991a..733907a34901 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21332,6 +21332,7 @@ with pkgs; libtomcrypt = callPackage ../development/libraries/libtomcrypt { }; libtorrent-rasterbar-2_0_x = callPackage ../development/libraries/libtorrent-rasterbar { + stdenv = if stdenv.isDarwin then llvmPackages_14.stdenv else stdenv; inherit (darwin.apple_sdk.frameworks) SystemConfiguration; python = python3; }; From fe496f58976116d520222f430ebc4690360259fd Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:15:23 +0100 Subject: [PATCH 2/2] qbittorrent: add darwin support --- .../networking/p2p/qbittorrent/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix index 1b4f12874dbd..76fc70b3bad0 100644 --- a/pkgs/applications/networking/p2p/qbittorrent/default.nix +++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub, pkg-config +{ mkDerivation, lib, stdenv, fetchFromGitHub, pkg-config , boost, libtorrent-rasterbar, qtbase, qttools, qtsvg , debugSupport ? false , guiSupport ? true, dbus ? null # GUI (disable to run headless) @@ -42,12 +42,18 @@ mkDerivation rec { qtWrapperArgs = optional trackerSearch "--prefix PATH : ${makeBinPath [ python3 ]}"; + postInstall = lib.optionalString stdenv.isDarwin '' + mkdir -p $out/{Applications,bin} + cp -R src/qbittorrent.app $out/Applications + makeWrapper $out/{Applications/qbittorrent.app/Contents/MacOS,bin}/qbittorrent + ''; + meta = { description = "Featureful free software BitTorrent client"; homepage = "https://www.qbittorrent.org/"; changelog = "https://github.com/qbittorrent/qBittorrent/blob/release-${version}/Changelog"; license = licenses.gpl2Plus; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ Anton-Latukha ]; }; }