summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/tools/networking/p2p
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/tools/networking/p2p')
-rw-r--r--pkgs/tools/networking/p2p/amule/default.nix75
-rw-r--r--pkgs/tools/networking/p2p/azureus/default.nix6
-rw-r--r--pkgs/tools/networking/p2p/gtk-gnutella/default.nix20
-rw-r--r--pkgs/tools/networking/p2p/libtorrent-jesec/default.nix38
-rw-r--r--pkgs/tools/networking/p2p/libtorrent/default.nix6
-rw-r--r--pkgs/tools/networking/p2p/rtorrent-jesec/default.nix57
-rw-r--r--pkgs/tools/networking/p2p/rtorrent/default.nix8
-rw-r--r--pkgs/tools/networking/p2p/seeks/default.nix69
8 files changed, 140 insertions, 139 deletions
diff --git a/pkgs/tools/networking/p2p/amule/default.nix b/pkgs/tools/networking/p2p/amule/default.nix
index 264c6fd4e16..96bf7656e8a 100644
--- a/pkgs/tools/networking/p2p/amule/default.nix
+++ b/pkgs/tools/networking/p2p/amule/default.nix
@@ -2,69 +2,46 @@
 , enableDaemon ? false # build amule daemon
 , httpServer ? false # build web interface for the daemon
 , client ? false # build amule remote gui
-, fetchFromGitHub, fetchpatch, stdenv, lib, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
-, autoreconfHook, pkgconfig, makeWrapper, libX11 ? null }:
-
-assert httpServer -> libpng != null;
-assert client -> libX11 != null;
+, fetchFromGitHub
+, stdenv
+, lib
+, cmake
+, zlib
+, wxGTK
+, perl
+, cryptopp
+, libupnp
+, gettext
+, libpng
+, autoreconfHook
+, pkg-config
+, makeWrapper
+, libX11
+}:
 
 stdenv.mkDerivation rec {
   pname = "amule";
-  version = "2.3.2";
+  version = "2.3.3";
 
   src = fetchFromGitHub {
     owner = "amule-project";
     repo = "amule";
     rev = version;
-    sha256 = "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn";
+    sha256 = "1nm4vxgmisn1b6l3drmz0q04x067j2i8lw5rnf0acaapwlp8qwvi";
   };
 
-  patches = [
-    (fetchpatch {
-      url = "https://patch-diff.githubusercontent.com/raw/amule-project/amule/pull/135.patch";
-      sha256 = "1n24r1j28083b8ipbnh1nf6i4j6vx59pdkfl1c0g6bb4psx9wvvi";
-      name = "libupnp_18.patch";
-    })
-    (fetchpatch {
-      name = "amule-cryptopp_6.patch";
-      url = "https://github.com/amule-project/amule/commit/27c13f3e622b8a3eaaa05bb62b0149604bdcc9e8.patch";
-      sha256 = "0kq095gi3xl665wr864zlhp5f3blk75pr725yany8ilzcwrzdrnm";
-    })
-  ];
-
-  postPatch = ''
-    substituteInPlace src/libs/ec/file_generator.pl \
-      --replace /usr/bin/perl ${perl}/bin/perl
-
-    # autotools expects these to be in the root
-    cp docs/{AUTHORS,README} .
-    cp docs/Changelog ./ChangeLog
-    cp docs/Changelog ./NEWS
-  '';
-
-  preAutoreconf = ''
-    pushd src/pixmaps/flags_xpm >/dev/null
-    ./makeflags.sh
-    popd >/dev/null
-  '';
-
-  nativeBuildInputs = [ autoreconfHook gettext makeWrapper pkgconfig ];
+  nativeBuildInputs = [ cmake gettext makeWrapper pkg-config ];
 
   buildInputs = [
-    zlib wxGTK perl cryptopp libupnp
+    zlib wxGTK perl cryptopp.dev libupnp
   ] ++ lib.optional httpServer libpng
     ++ lib.optional client libX11;
 
-  enableParallelBuilding = true;
-
-  configureFlags = [
-    "--with-crypto-prefix=${cryptopp}"
-    "--disable-debug"
-    "--enable-optimize"
-    (lib.enableFeature monolithic   "monolithic")
-    (lib.enableFeature enableDaemon "amule-daemon")
-    (lib.enableFeature client       "amule-gui")
-    (lib.enableFeature httpServer   "webserver")
+  cmakeFlags = [
+    "-DBUILD_MONOLITHIC=${if monolithic then "ON" else "OFF"}"
+    "-DBUILD_DAEMON=${if enableDaemon then "ON" else "OFF"}"
+    "-DBUILD_REMOTEGUI=${if client then "ON" else "OFF"}"
+    "-DBUILD_WEBSERVER=${if httpServer then "ON" else "OFF"}"
   ];
 
   # aMule will try to `dlopen' libupnp and libixml, so help it
@@ -91,5 +68,7 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ phreedom ];
     platforms = platforms.unix;
+    # cmake fails: Cannot specify link libraries for target "wxWidgets::ADV" which is not built by this project.
+    broken = enableDaemon;
   };
 }
diff --git a/pkgs/tools/networking/p2p/azureus/default.nix b/pkgs/tools/networking/p2p/azureus/default.nix
index 03737f9af27..1c72be0c510 100644
--- a/pkgs/tools/networking/p2p/azureus/default.nix
+++ b/pkgs/tools/networking/p2p/azureus/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, jdk, swt}:
+{lib, stdenv, fetchurl, jdk, swt}:
 
 stdenv.mkDerivation {
   name = "azureus-2.3.0.6";
@@ -7,10 +7,10 @@ stdenv.mkDerivation {
     url = "http://tarballs.nixos.org/Azureus2.3.0.6.jar";
     sha256 = "1hwrh3n0b0jbpsdk15zrs7pw175418phhmg6pn4xi1bvilxq1wrd";
   };
-#  buildInputs = [unzip];
+
   inherit jdk swt;
 
   meta = {
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/tools/networking/p2p/gtk-gnutella/default.nix b/pkgs/tools/networking/p2p/gtk-gnutella/default.nix
index 710f7dedb99..8d8069bec29 100644
--- a/pkgs/tools/networking/p2p/gtk-gnutella/default.nix
+++ b/pkgs/tools/networking/p2p/gtk-gnutella/default.nix
@@ -1,8 +1,8 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , fetchpatch
 , bison
-, pkgconfig
+, pkg-config
 , gettext
 , desktop-file-utils
 , glib
@@ -17,22 +17,20 @@
 
 stdenv.mkDerivation rec {
   pname = "gtk-gnutella";
-  # NOTE: Please remove hardeningDisable on the next release, see:
-  # https://sourceforge.net/p/gtk-gnutella/bugs/555/#5c19
-  version = "1.2.0";
+  version = "1.2.1";
 
   src = fetchFromGitHub {
     owner = "gtk-gnutella";
     repo = "gtk-gnutella";
     rev = "v${version}";
-    sha256 = "0j596dpajk68bkry0gmpqawsi61rphfciy4vji1dh890jyhkhdgy";
+    sha256 = "sha256-Hk5KPXSJ2s0J/stW3Qgvu6p6RG5VCvuWx1UlMR+3JO4=";
   };
 
   nativeBuildInputs = [
     bison
     desktop-file-utils
     gettext
-    pkgconfig
+    pkg-config
   ];
   buildInputs = [
     glib
@@ -42,7 +40,7 @@ stdenv.mkDerivation rec {
     zlib
   ]
   ++
-    stdenv.lib.optionals (enableGui) [ gtk2 ]
+    lib.optionals (enableGui) [ gtk2 ]
   ;
 
   configureScript = "./build.sh";
@@ -51,18 +49,16 @@ stdenv.mkDerivation rec {
     # See https://sourceforge.net/p/gtk-gnutella/bugs/555/
     "--disable-malloc"
   ]
-    ++ stdenv.lib.optionals (!enableGui) [ "--topless" ]
+    ++ lib.optionals (!enableGui) [ "--topless" ]
   ;
 
-  hardeningDisable = [ "bindnow" "fortify" "pic" "relro" ];
-
   enableParallelBuilding = true;
 
   postInstall = ''
     install -Dm0444 src/${pname}.man $out/share/man/man1/${pname}.1
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A GTK Gnutella client, optimized for speed and scalability";
     homepage = "http://gtk-gnutella.sourceforge.net/"; # Code: https://github.com/gtk-gnutella/gtk-gnutella
     changelog = "https://raw.githubusercontent.com/gtk-gnutella/gtk-gnutella/v${version}/ChangeLog";
diff --git a/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix b/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix
new file mode 100644
index 00000000000..0fd16f4799d
--- /dev/null
+++ b/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, gtest, openssl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libtorrent-jesec";
+  version = "0.13.8-r2";
+
+  src = fetchFromGitHub {
+    owner = "jesec";
+    repo = "libtorrent";
+    rev = "v${version}";
+    sha256 = "sha256-eIXVTbVOCRHcxSsLPvIm9F60t2upk5ORpDSOOYqTCJ4=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "test-fallback";
+      url = "https://github.com/jesec/libtorrent/commit/a38205ce06aadc9908478ec3a9c8aefd9be06344.patch";
+      sha256 = "sha256-2TyQ9zYWZw6bzAfVZzTOQSkfIZnDU8ykgpRAFXscEH0=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openssl zlib ];
+
+  doCheck = true;
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD
+  '';
+  checkInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "A BitTorrent library written in C++ for *nix, with focus on high performance and good code (jesec's fork)";
+    homepage = "https://github.com/jesec/libtorrent";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ winterqt ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/networking/p2p/libtorrent/default.nix b/pkgs/tools/networking/p2p/libtorrent/default.nix
index f750e3b1bfe..4d3ccf5fc15 100644
--- a/pkgs/tools/networking/p2p/libtorrent/default.nix
+++ b/pkgs/tools/networking/p2p/libtorrent/default.nix
@@ -1,6 +1,6 @@
 # NOTE: this is rakshava's version of libtorrent, used mainly by rtorrent
 # This is NOT libtorrent-rasterbar, used by Deluge, qbitttorent, and others
-{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
 , cppunit, openssl, libsigcxx, zlib
 }:
 
@@ -15,10 +15,10 @@ stdenv.mkDerivation rec {
     sha256 = "1h5y6ab3gs20yyprdfwcw8fh1c6czs4yrdj0kf54d2vp9qwz685r";
   };
 
-  nativeBuildInputs = [ pkgconfig autoreconfHook ];
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
   buildInputs = [ cppunit openssl libsigcxx zlib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/rakshasa/libtorrent";
     description = "A BitTorrent library written in C++ for *nix, with focus on high performance and good code";
 
diff --git a/pkgs/tools/networking/p2p/rtorrent-jesec/default.nix b/pkgs/tools/networking/p2p/rtorrent-jesec/default.nix
new file mode 100644
index 00000000000..eeff6e91399
--- /dev/null
+++ b/pkgs/tools/networking/p2p/rtorrent-jesec/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, libtorrent-jesec
+, curl
+, ncurses
+, xmlrpc_c
+, nlohmann_json
+, xmlRpcSupport ? true
+, jsonRpcSupport ? true
+}:
+let
+  inherit (lib) optional;
+in
+stdenv.mkDerivation rec {
+  pname = "rtorrent-jesec";
+  version = "0.9.8-r14";
+
+  src = fetchFromGitHub {
+    owner = "jesec";
+    repo = "rtorrent";
+    rev = "v${version}";
+    sha256 = "sha256-AbjzNIha3MkCZi6MuyUfPx9r3zeXeTUzkbD7uHB85lo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libtorrent-jesec curl ncurses ]
+    ++ optional xmlRpcSupport xmlrpc_c
+    ++ optional jsonRpcSupport nlohmann_json;
+
+  cmakeFlags = [ "-DUSE_RUNTIME_CA_DETECTION=NO" ]
+    ++ optional (!xmlRpcSupport) "-DUSE_XMLRPC=NO"
+    ++ optional (!jsonRpcSupport) "-DUSE_JSONRPC=NO";
+
+  doCheck = true;
+  checkInputs = [ gtest ];
+
+  prePatch = ''
+    substituteInPlace src/main.cc \
+      --replace "/etc/rtorrent/rtorrent.rc" "${placeholder "out"}/etc/rtorrent/rtorrent.rc"
+  '';
+
+  postFixup = ''
+    mkdir -p $out/etc/rtorrent
+    cp $src/doc/rtorrent.rc $out/etc/rtorrent/rtorrent.rc
+  '';
+
+  meta = with lib; {
+    description = "An ncurses client for libtorrent, ideal for use with screen, tmux, or dtach (jesec's fork)";
+    homepage = "https://github.com/jesec/rtorrent";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ winterqt ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/networking/p2p/rtorrent/default.nix b/pkgs/tools/networking/p2p/rtorrent/default.nix
index b55c673c058..20f9cec6f5f 100644
--- a/pkgs/tools/networking/p2p/rtorrent/default.nix
+++ b/pkgs/tools/networking/p2p/rtorrent/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, pkgconfig
+{ lib, stdenv, fetchurl, fetchFromGitHub, pkg-config
 , libtool, autoconf, automake, cppunit
 , libtorrent, ncurses, libsigcxx, curl
 , zlib, openssl, xmlrpc_c
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     sha256 = "0hcaf1brk402caa7hhlb2r1c93mjzxkm8gb19xfl33gkp3jpf372";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [
     libtool autoconf automake cppunit
     libtorrent ncurses libsigcxx curl zlib openssl xmlrpc_c
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
 
   # Optional patch adds support for custom configurable colors
   # https://github.com/Chlorm/chlorm_overlay/blob/master/net-p2p/rtorrent/README.md
-  patches = stdenv.lib.optional colorSupport (fetchurl {
+  patches = lib.optional colorSupport (fetchurl {
     url = "https://gist.githubusercontent.com/codyopel/a816c2993f8013b5f4d6/raw/b952b32da1dcf14c61820dfcf7df00bc8918fec4/rtorrent-color.patch";
     sha256 = "00gcl7yq6261rrfzpz2k8bd7mffwya0ifji1xqcvhfw50syk8965";
   });
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
     mv doc/rtorrent.rc $out/share/doc/rtorrent/rtorrent.rc
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://rakshasa.github.io/rtorrent/";
     description = "An ncurses client for libtorrent, ideal for use with screen, tmux, or dtach";
 
diff --git a/pkgs/tools/networking/p2p/seeks/default.nix b/pkgs/tools/networking/p2p/seeks/default.nix
deleted file mode 100644
index eccf38f39fd..00000000000
--- a/pkgs/tools/networking/p2p/seeks/default.nix
+++ /dev/null
@@ -1,69 +0,0 @@
-{ fetchgit, stdenv, zlib, bzip2, docbook2x, pcre, curl, libxml2, libevent, perl
-, pkgconfig, protobuf, tokyocabinet, tokyotyrant, opencv, autoconf, automake
-, libtool, seeks_confDir ? ""
-}:
-
-stdenv.mkDerivation {
-  name = "seeks-0.4.1";
-
-  src = fetchgit {
-    url = "git://github.com/beniz/seeks.git";
-    rev = "1168b3a2f3111c3fca31dd961135194c3e8df5fd";
-    sha256 = "18s2pxal9a2aayv63hc19vnkx5a5y9rhbipdpvkinbni5283iiar";
-  };
-
-  buildInputs =
-    [ zlib bzip2 docbook2x pcre curl libxml2 libevent perl pkgconfig
-      protobuf tokyocabinet tokyotyrant opencv autoconf automake libtool
-    ];
-
-  configureFlags =
-    [ # Enable the built-in web server providing a web search interface.
-      "--enable-httpserv-plugin=yes"
-      "--with-libevent=${libevent.dev}"
-    ];
-
-  preConfigure = ''
-    ./autogen.sh
-  '';
-
-  postInstall = stdenv.lib.optionalString (seeks_confDir != "") ''
-    ln -svf ${seeks_confDir}/config $out/etc/seeks/config
-    ln -svf ${seeks_confDir}/cf-config $out/etc/seeks/cf-config
-    ln -svf ${seeks_confDir}/httpserv-config $out/etc/seeks/httpserv-config
-    ln -svf ${seeks_confDir}/img-websearch-config $out/etc/seeks/img-websearch-config
-    ln -svf ${seeks_confDir}/lsh-config $out/etc/seeks/lsh-config
-    ln -svf ${seeks_confDir}/query-capture-config $out/etc/seeks/query-capture-config
-    ln -svf ${seeks_confDir}/udb-service-config $out/etc/seeks/udb-service-config
-    ln -svf ${seeks_confDir}/uri-capture-config $out/etc/seeks/uri-capture-config
-    ln -svf ${seeks_confDir}/websearch-config $out/etc/seeks/websearch-config
-  '';
-
-  # FIXME: Test suite needs <https://code.google.com/p/googletest/>.
-  doCheck = false;
-
-  meta = {
-    description = "Seeks, a social web search engine";
-
-    longDescription =
-      '' Seeks is a free and open technical design and application for
-         enabling social websearch.  Its specific purpose is to regroup users
-         whose queries are similar so they can share both the query results
-         and their experience on these results.  On this basis, Seeks allows
-         for true real-time, decentralized, websearch to emerge.
-
-         In the long term, there is no need for web crawlers and third-party
-         web indexes as users can push content directly to search groups.
-      '';
-
-    license = stdenv.lib.licenses.agpl3Plus;
-
-    homepage = "http://www.seeks-project.info/";
-
-    maintainers = [
-      stdenv.lib.maintainers.matejc
-    ];
-    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;  # arbitrary choice
-    broken = true; # 2018-04-11
-  };
-}