summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/p2p')
-rw-r--r--pkgs/applications/networking/p2p/freenet/default.nix3
-rw-r--r--pkgs/applications/networking/p2p/gnunet/default.nix6
-rw-r--r--pkgs/applications/networking/p2p/gnunet/gtk.nix10
-rw-r--r--pkgs/applications/networking/p2p/libutp/3.4.nix6
-rw-r--r--pkgs/applications/networking/p2p/mldonkey/default.nix2
-rw-r--r--pkgs/applications/networking/p2p/pyrosimple/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/qbittorrent/default.nix108
-rw-r--r--pkgs/applications/networking/p2p/rqbit/default.nix29
-rw-r--r--pkgs/applications/networking/p2p/transmission/4.nix19
-rw-r--r--pkgs/applications/networking/p2p/transmission/default.nix12
-rw-r--r--pkgs/applications/networking/p2p/tremotesf/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/zeronet-conservancy/default.nix2
-rw-r--r--pkgs/applications/networking/p2p/zeronet/default.nix2
13 files changed, 110 insertions, 97 deletions
diff --git a/pkgs/applications/networking/p2p/freenet/default.nix b/pkgs/applications/networking/p2p/freenet/default.nix
index 8a46b5a476c..3ca23647251 100644
--- a/pkgs/applications/networking/p2p/freenet/default.nix
+++ b/pkgs/applications/networking/p2p/freenet/default.nix
@@ -16,8 +16,9 @@ let
 
   patches = [
     # gradle 7 support
+    # https://github.com/freenet/fred/pull/827
     (fetchpatch {
-      url = "https://github.com/freenet/fred/pull/827.patch";
+      url = "https://github.com/freenet/fred/commit/8991303493f2c0d9933f645337f0a7a5a979e70a.patch";
       sha256 = "sha256-T1zymxRTADVhhwp2TyB+BC/J4gZsT/CUuMrT4COlpTY=";
     })
   ];
diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix
index 2fdaf3c52f4..27476d3b48a 100644
--- a/pkgs/applications/networking/p2p/gnunet/default.nix
+++ b/pkgs/applications/networking/p2p/gnunet/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "gnunet";
-  version = "0.19.4";
+  version = "0.20.0";
 
   src = fetchurl {
     url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz";
-    sha256 = "sha256-AKY99AjVmH9bqaUEQfKncYK9n7MvHjAq5WOslOesAJs=";
+    sha256 = "sha256-VgKeeKmcBNUrE1gJSuUHTkzY6puYz2hV9XrZryeslRg=";
   };
 
   enableParallelBuilding = true;
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
     homepage = "https://gnunet.org/";
     license = licenses.agpl3Plus;
     maintainers = with maintainers; [ pstn vrthra ];
-    platforms = platforms.gnu ++ platforms.linux;
+    platforms = platforms.unix;
     changelog = "https://git.gnunet.org/gnunet.git/tree/ChangeLog?h=v${version}";
   };
 }
diff --git a/pkgs/applications/networking/p2p/gnunet/gtk.nix b/pkgs/applications/networking/p2p/gnunet/gtk.nix
index 739c3013e52..94504f2b995 100644
--- a/pkgs/applications/networking/p2p/gnunet/gtk.nix
+++ b/pkgs/applications/networking/p2p/gnunet/gtk.nix
@@ -13,11 +13,11 @@
 
 stdenv.mkDerivation rec {
   pname = "gnunet-gtk";
-  version = "0.19.0";
+  version = "0.20.0";
 
   src = fetchurl {
     url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz";
-    sha256 = "sha256-MwAWs1rHXYlRUcAWX8LnCLTwEOSI68aA0s7uZGgYR3w=";
+    sha256 = "sha256-6ZHlDIKrTmr/aRz4k5FtRVxZ7B9Hlh2w42QT4YRsVi0=";
   };
 
   nativeBuildInputs= [
@@ -38,7 +38,11 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--with-gnunet=${gnunet}" ];
 
-  patchPhase = "patchShebangs pixmaps/icon-theme-installer";
+  postPatch = "patchShebangs pixmaps/icon-theme-installer";
+
+  postInstall = ''
+    ln -s $out/share/gnunet-gtk/gnunet_logo.png $out/share/gnunet/gnunet-logo-color.png
+  '';
 
   meta = gnunet.meta // {
     description = "GNUnet GTK User Interface";
diff --git a/pkgs/applications/networking/p2p/libutp/3.4.nix b/pkgs/applications/networking/p2p/libutp/3.4.nix
index 4ea4ebbb2dc..aa2853d3bd0 100644
--- a/pkgs/applications/networking/p2p/libutp/3.4.nix
+++ b/pkgs/applications/networking/p2p/libutp/3.4.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "libutp";
-  version = "unstable-2023-03-05";
+  version = "unstable-2023-10-16";
 
   src = fetchFromGitHub {
     # Use transmission fork from post-3.4-transmission branch
     owner = "transmission";
     repo = pname;
-    rev = "9cb9f9c4f0073d78b08d6542cebaea6564ecadfe";
-    hash = "sha256-dpbX1h/gpuVIAXC4hwwuRwQDJ0pwVVEsgemOVN0Dv9Q=";
+    rev = "2589200eac82fc91b65979680e4b3c026dff0278";
+    hash = "sha256-wsDqdbMWVm3ubTbg5XClEWutJz1irSIazVLFeCyAAL4=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/networking/p2p/mldonkey/default.nix b/pkgs/applications/networking/p2p/mldonkey/default.nix
index 7bc5e2f5967..81a625e5210 100644
--- a/pkgs/applications/networking/p2p/mldonkey/default.nix
+++ b/pkgs/applications/networking/p2p/mldonkey/default.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
   meta = {
     broken = stdenv.isDarwin;
     description = "Client for many p2p networks, with multiple frontends";
-    homepage = "http://mldonkey.sourceforge.net/";
+    homepage = "https://github.com/ygrek/mldonkey";
     license = lib.licenses.gpl2Only;
     platforms = lib.platforms.unix;
   };
diff --git a/pkgs/applications/networking/p2p/pyrosimple/default.nix b/pkgs/applications/networking/p2p/pyrosimple/default.nix
index 15e7304ef9b..59cf07d695a 100644
--- a/pkgs/applications/networking/p2p/pyrosimple/default.nix
+++ b/pkgs/applications/networking/p2p/pyrosimple/default.nix
@@ -10,14 +10,14 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "pyrosimple";
-  version = "2.10.2";
+  version = "2.12.0";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "kannibalox";
     repo = pname;
     rev = "refs/tags/v${version}";
-    hash = "sha256-3ZsRJNGbcKGU6v2uYUintMpKY8Z/DyTIDDxTsDEV6lw=";
+    hash = "sha256-6TDfNkEqtSrPpyExJ/68GAalIo9pSNiIDo7KdqwoulQ=";
   };
 
   pythonRelaxDeps = [
diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix
index a82adc4dc3d..12aa4b8e508 100644
--- a/pkgs/applications/networking/p2p/qbittorrent/default.nix
+++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -1,58 +1,92 @@
-{ mkDerivation, lib, stdenv, fetchFromGitHub, pkg-config
-, boost, libtorrent-rasterbar, qtbase, qttools, qtsvg
-, debugSupport ? false
-, guiSupport ? true, dbus ? null # GUI (disable to run headless)
-, webuiSupport ? true # WebUI
-, trackerSearch ? true, python3 ? null
-}:
+{ lib
+, stdenv
+, fetchFromGitHub
+
+, boost
+, cmake
+, Cocoa
+, libtorrent-rasterbar
+, ninja
+, qtbase
+, qtsvg
+, qttools
+, wrapQtAppsHook
 
-assert guiSupport -> (dbus != null);
-assert trackerSearch -> (python3 != null);
+, guiSupport ? true
+, dbus
+, qtwayland
 
-mkDerivation rec {
-  pname = "qbittorrent" + lib.optionalString (!guiSupport) "-nox";
-  version = "4.5.5";
+, trackerSearch ? true
+, python3
+
+, webuiSupport ? true
+}:
+
+let
+  qtVersion = lib.versions.major qtbase.version;
+in
+stdenv.mkDerivation rec {
+  pname = "qbittorrent"
+    + lib.optionalString (guiSupport && qtVersion == "5") "-qt5"
+    + lib.optionalString (!guiSupport) "-nox";
+  version = "4.6.0";
 
   src = fetchFromGitHub {
     owner = "qbittorrent";
     repo = "qBittorrent";
     rev = "release-${version}";
-    hash = "sha256-rWv+KGw+3385GOKK4MvoSP0CepotUZELiDVFpyDf+9k=";
+    hash = "sha256-o9zMGjVCXLqdRdXzRs1kFPDMFJXQWBEtWwIfeIyFxJw=";
   };
 
-  enableParallelBuilding = true;
-
-  # NOTE: 2018-05-31: CMake is working but it is not officially supported
-  nativeBuildInputs = [ pkg-config ];
-
-  buildInputs = [ boost libtorrent-rasterbar qtbase qttools qtsvg ]
-    ++ lib.optional guiSupport dbus # D(esktop)-Bus depends on GUI support
-    ++ lib.optional trackerSearch python3;
+  nativeBuildInputs = [
+    cmake
+    ninja
+    wrapQtAppsHook
+  ];
 
-  # Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
-  QMAKE_LRELEASE = "lrelease";
+  buildInputs = [
+    boost
+    libtorrent-rasterbar
+    qtbase
+    qtsvg
+    qttools
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+  ] ++ lib.optionals guiSupport [
+    dbus
+  ] ++ lib.optionals (guiSupport && stdenv.isLinux) [
+    qtwayland
+  ] ++ lib.optionals trackerSearch [
+    python3
+  ];
 
-  configureFlags = [
-    "--with-boost-libdir=${boost.out}/lib"
-    "--with-boost=${boost.dev}" ]
-    ++ lib.optionals (!guiSupport) [ "--disable-gui" "--enable-systemd" ] # Also place qbittorrent-nox systemd service files
-    ++ lib.optional (!webuiSupport) "--disable-webui"
-    ++ lib.optional debugSupport "--enable-debug";
+  cmakeFlags = lib.optionals (qtVersion == "6") [
+    "-DQT6=ON"
+  ] ++ lib.optionals (!guiSupport) [
+    "-DGUI=OFF"
+    "-DSYSTEMD=ON"
+    "-DSYSTEMD_SERVICES_INSTALL_DIR=${placeholder "out"}/lib/systemd/system"
+  ] ++ lib.optionals (!webuiSupport) [
+    "-DWEBUI=OFF"
+  ];
 
-  qtWrapperArgs = lib.optional trackerSearch "--prefix PATH : ${lib.makeBinPath [ python3 ]}";
+  qtWrapperArgs = lib.optionals trackerSearch [
+    "--prefix PATH : ${lib.makeBinPath [ python3 ]}"
+  ];
 
   postInstall = lib.optionalString stdenv.isDarwin ''
+    APP_NAME=qbittorrent${lib.optionalString (!guiSupport) "-nox"}
     mkdir -p $out/{Applications,bin}
-    cp -R src/${pname}.app $out/Applications
-    makeWrapper $out/{Applications/${pname}.app/Contents/MacOS,bin}/${pname}
+    cp -R $APP_NAME.app $out/Applications
+    makeWrapper $out/{Applications/$APP_NAME.app/Contents/MacOS,bin}/$APP_NAME
   '';
 
   meta = with lib; {
     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.unix;
-    maintainers = with maintainers; [ Anton-Latukha kashw2 ];
+    homepage = "https://www.qbittorrent.org";
+    changelog = "https://github.com/qbittorrent/qBittorrent/blob/release-${version}/Changelog";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ Anton-Latukha kashw2 paveloom ];
   };
 }
diff --git a/pkgs/applications/networking/p2p/rqbit/default.nix b/pkgs/applications/networking/p2p/rqbit/default.nix
deleted file mode 100644
index a60b3e9ddf7..00000000000
--- a/pkgs/applications/networking/p2p/rqbit/default.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, Security }:
-
-rustPlatform.buildRustPackage rec {
-  pname = "rqbit";
-  version = "2.2.1";
-
-  src = fetchFromGitHub {
-    owner = "ikatson";
-    repo = "rqbit";
-    rev = "v${version}";
-    hash = "sha256-7n+T+y60RjmZC7bE96Ljg0xVg4bSzV/LFgezTld4zfI=";
-  };
-
-  cargoHash = "sha256-hcuZ4hqGJT/O7vFefKPGZlkqhdsAl5LGAcSRQAEopnM=";
-
-  nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
-
-  buildInputs = lib.optionals stdenv.isLinux [ openssl ]
-    ++ lib.optionals stdenv.isDarwin [ Security ];
-
-  doCheck = false;
-
-  meta = with lib; {
-    description = "A bittorrent client in Rust";
-    homepage = "https://github.com/ikatson/rqbit";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ marsam ];
-  };
-}
diff --git a/pkgs/applications/networking/p2p/transmission/4.nix b/pkgs/applications/networking/p2p/transmission/4.nix
index 05d757d53a2..62f0d3933a3 100644
--- a/pkgs/applications/networking/p2p/transmission/4.nix
+++ b/pkgs/applications/networking/p2p/transmission/4.nix
@@ -21,7 +21,7 @@
 , dht
 , libnatpmp
 , libiconv
-, darwin
+, Foundation
   # Build options
 , enableGTK3 ? false
 , gtkmm3
@@ -37,14 +37,14 @@
 , apparmorRulesFromClosure
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "transmission";
   version = "4.0.4";
 
   src = fetchFromGitHub {
     owner = "transmission";
     repo = "transmission";
-    rev = version;
+    rev = finalAttrs.version;
     hash = "sha256-Sz3+5VvfOgET1aiormEnBOrF+yN79tiSQvjLAoGqTLw=";
     fetchSubmodules = true;
   };
@@ -113,7 +113,7 @@ stdenv.mkDerivation rec {
   ++ lib.optionals enableGTK3 [ gtkmm3 xorg.libpthreadstubs ]
   ++ lib.optionals enableSystemd [ systemd ]
   ++ lib.optionals stdenv.isLinux [ inotify-tools ]
-  ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Foundation ];
+  ++ lib.optionals stdenv.isDarwin [ libiconv Foundation ];
 
   postInstall = ''
     mkdir $apparmor
@@ -139,10 +139,17 @@ stdenv.mkDerivation rec {
       include <local/bin.transmission-daemon>
     }
     EOF
+    install -Dm0444 -t $out/share/icons ../qt/icons/transmission.svg
   '';
 
+  passthru.tests = {
+    apparmor = nixosTests.transmission_4; # starts the service with apparmor enabled
+    smoke-test = nixosTests.bittorrent;
+  };
+
   meta = {
     description = "A fast, easy and free BitTorrent client";
+    mainProgram = if enableQt then "transmission-qt" else if enableGTK3 then "transmission-gtk" else "transmission-cli";
     longDescription = ''
       Transmission is a BitTorrent client which features a simple interface
       on top of a cross-platform back-end.
@@ -158,7 +165,5 @@ stdenv.mkDerivation rec {
     license = with lib.licenses; [ gpl2Plus mit ];
     maintainers = with lib.maintainers; [ astsmtl ];
     platforms = lib.platforms.unix;
-    # Needs macOS >= 10.14.6
-    broken = stdenv.isDarwin && stdenv.isx86_64;
   };
-}
+})
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix
index cc82c503808..58de6fa9754 100644
--- a/pkgs/applications/networking/p2p/transmission/default.nix
+++ b/pkgs/applications/networking/p2p/transmission/default.nix
@@ -32,17 +32,14 @@
 , apparmorRulesFromClosure
 }:
 
-let
-  version = "3.00";
-
-in stdenv.mkDerivation {
+stdenv.mkDerivation (finalAttrs: {
   pname = "transmission";
-  inherit version;
+  version = "3.00";
 
   src = fetchFromGitHub {
     owner = "transmission";
     repo = "transmission";
-    rev = version;
+    rev = finalAttrs.version;
     sha256 = "0ccg0km54f700x9p0jsnncnwvfnxfnxf7kcm7pcx1cj0vw78924z";
     fetchSubmodules = true;
   };
@@ -129,6 +126,7 @@ in stdenv.mkDerivation {
 
   meta = {
     description = "A fast, easy and free BitTorrent client";
+    mainProgram = if enableQt then "transmission-qt" else if enableGTK3 then "transmission-gtk" else "transmission-cli";
     longDescription = ''
       Transmission is a BitTorrent client which features a simple interface
       on top of a cross-platform back-end.
@@ -146,4 +144,4 @@ in stdenv.mkDerivation {
     platforms = lib.platforms.unix;
   };
 
-}
+})
diff --git a/pkgs/applications/networking/p2p/tremotesf/default.nix b/pkgs/applications/networking/p2p/tremotesf/default.nix
index 6880d847216..4cd7358d2b7 100644
--- a/pkgs/applications/networking/p2p/tremotesf/default.nix
+++ b/pkgs/applications/networking/p2p/tremotesf/default.nix
@@ -15,13 +15,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "tremotesf";
-  version = "2.4.0";
+  version = "2.5.0";
 
   src = fetchFromGitHub {
     owner = "equeim";
     repo = "tremotesf2";
     rev = finalAttrs.version;
-    hash = "sha256-TKtBgMpCWIUl1bohAKCbTcZX2uaPmzeWut/OeNs/rME=";
+    hash = "sha256-mxk2BRUuet3XSNaKt2Dnnxe5dliazd1ArRSnKyoAp1s=";
     # We need this for src/libtremotesf
     fetchSubmodules = true;
   };
diff --git a/pkgs/applications/networking/p2p/zeronet-conservancy/default.nix b/pkgs/applications/networking/p2p/zeronet-conservancy/default.nix
index c8ac75683ae..df91e40eab8 100644
--- a/pkgs/applications/networking/p2p/zeronet-conservancy/default.nix
+++ b/pkgs/applications/networking/p2p/zeronet-conservancy/default.nix
@@ -24,7 +24,7 @@ python3Packages.buildPythonApplication rec {
 
   buildPhase = ''
     runHook preBuild
-    ${python3Packages.python.pythonForBuild.interpreter} -O -m compileall .
+    ${python3Packages.python.pythonOnBuildForHost.interpreter} -O -m compileall .
     runHook postBuild
   '';
 
diff --git a/pkgs/applications/networking/p2p/zeronet/default.nix b/pkgs/applications/networking/p2p/zeronet/default.nix
index 07ea1707526..d0a358a5ba1 100644
--- a/pkgs/applications/networking/p2p/zeronet/default.nix
+++ b/pkgs/applications/networking/p2p/zeronet/default.nix
@@ -18,7 +18,7 @@ python3Packages.buildPythonApplication rec {
   ];
 
   buildPhase = ''
-    ${python3Packages.python.pythonForBuild.interpreter} -O -m compileall .
+    ${python3Packages.python.pythonOnBuildForHost.interpreter} -O -m compileall .
   '';
 
   installPhase = ''