Merge pull request #142518 from AndersonTorres/new-rtorrent
rtorrent updates
This commit is contained in:
commit
718895c149
10 changed files with 221 additions and 149 deletions
9
pkgs/tools/networking/p2p/jesec-rtorrent/default.nix
Normal file
9
pkgs/tools/networking/p2p/jesec-rtorrent/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
rec {
|
||||
libtorrent = callPackage ./libtorrent.nix { };
|
||||
rtorrent = callPackage ./rtorrent.nix { };
|
||||
}
|
44
pkgs/tools/networking/p2p/jesec-rtorrent/libtorrent.nix
Normal file
44
pkgs/tools/networking/p2p/jesec-rtorrent/libtorrent.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, gtest
|
||||
, openssl
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jesec-libtorrent";
|
||||
version = "0.13.8-r3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jesec";
|
||||
repo = "libtorrent";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-S3DOKzXkvU+ZJxfrxwLXCVBnepzmiZ+3iiQqz084BEk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
buildInputs = [
|
||||
openssl
|
||||
zlib
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD
|
||||
'';
|
||||
checkInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jesec/libtorrent";
|
||||
description = "A BitTorrent library written in C++ for *nix, with focus on high performance and good code (jesec's fork)";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ winterqt AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -2,40 +2,48 @@
|
|||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, gtest
|
||||
, libtorrent-jesec
|
||||
, curl
|
||||
, gtest
|
||||
, libtorrent
|
||||
, ncurses
|
||||
, xmlrpc_c
|
||||
, nlohmann_json
|
||||
, xmlRpcSupport ? true
|
||||
, jsonRpcSupport ? true
|
||||
, jsonRpcSupport ? true, nlohmann_json
|
||||
, xmlRpcSupport ? true, xmlrpc_c
|
||||
}:
|
||||
let
|
||||
inherit (lib) optional;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rtorrent-jesec";
|
||||
version = "0.9.8-r14";
|
||||
pname = "jesec-rtorrent";
|
||||
version = "0.9.8-r15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jesec";
|
||||
repo = "rtorrent";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AbjzNIha3MkCZi6MuyUfPx9r3zeXeTUzkbD7uHB85lo=";
|
||||
hash = "sha256-yYOw8wsiQd478JijLgPtEWsw2/ewd46re+t9D705rmk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libtorrent-jesec curl ncurses ]
|
||||
++ optional xmlRpcSupport xmlrpc_c
|
||||
++ optional jsonRpcSupport nlohmann_json;
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
libtorrent
|
||||
ncurses
|
||||
]
|
||||
++ lib.optional jsonRpcSupport nlohmann_json
|
||||
++ lib.optional xmlRpcSupport xmlrpc_c;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_RUNTIME_CA_DETECTION=NO"
|
||||
]
|
||||
++ lib.optional (!jsonRpcSupport) "-DUSE_JSONRPC=NO"
|
||||
++ lib.optional (!xmlRpcSupport) "-DUSE_XMLRPC=NO";
|
||||
|
||||
cmakeFlags = [ "-DUSE_RUNTIME_CA_DETECTION=NO" ]
|
||||
++ optional (!xmlRpcSupport) "-DUSE_XMLRPC=NO"
|
||||
++ optional (!jsonRpcSupport) "-DUSE_JSONRPC=NO";
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ gtest ];
|
||||
checkInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace src/main.cc \
|
||||
|
@ -51,7 +59,7 @@ stdenv.mkDerivation rec {
|
|||
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 ];
|
||||
maintainers = with maintainers; [ winterqt AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
# NOTE: this is rakshava's version of libtorrent, used mainly by rtorrent
|
||||
# This is NOT libtorrent-rasterbar, used by Deluge, qbitttorent, and others
|
||||
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
|
||||
, cppunit, openssl, libsigcxx, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libtorrent";
|
||||
version = "0.13.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rakshasa";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1h5y6ab3gs20yyprdfwcw8fh1c6czs4yrdj0kf54d2vp9qwz685r";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||
buildInputs = [ cppunit openssl libsigcxx zlib ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
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";
|
||||
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ebzzry codyopel ];
|
||||
};
|
||||
}
|
9
pkgs/tools/networking/p2p/rakshasa-rtorrent/default.nix
Normal file
9
pkgs/tools/networking/p2p/rakshasa-rtorrent/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
rec {
|
||||
libtorrent = callPackage ./libtorrent.nix { };
|
||||
rtorrent = callPackage ./rtorrent.nix { };
|
||||
}
|
48
pkgs/tools/networking/p2p/rakshasa-rtorrent/libtorrent.nix
Normal file
48
pkgs/tools/networking/p2p/rakshasa-rtorrent/libtorrent.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Note: this is rakshasa's version of libtorrent, used mainly by rtorrent.
|
||||
# *Do not* mistake it by libtorrent-rasterbar, used by Deluge, qbitttorent etc.
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoconf-archive
|
||||
, autoreconfHook
|
||||
, cppunit
|
||||
, libsigcxx
|
||||
, openssl
|
||||
, pkg-config
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rakshasa-libtorrent";
|
||||
version = "0.13.8+date=2021-08-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rakshasa";
|
||||
repo = "libtorrent";
|
||||
rev = "53596afc5fae275b3fb5753a4bb2a1a7f7cf6a51";
|
||||
hash = "sha256-gyl/jfbptHz/gHkkVGWShhv1Z7o9fa9nJIz27U2A6wg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf-archive
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cppunit
|
||||
libsigcxx
|
||||
openssl
|
||||
zlib
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
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";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ebzzry codyopel ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
68
pkgs/tools/networking/p2p/rakshasa-rtorrent/rtorrent.nix
Normal file
68
pkgs/tools/networking/p2p/rakshasa-rtorrent/rtorrent.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, autoconf-archive
|
||||
, cppunit
|
||||
, curl
|
||||
, libsigcxx
|
||||
, libtool
|
||||
, libtorrent
|
||||
, ncurses
|
||||
, openssl
|
||||
, pkg-config
|
||||
, xmlrpc_c
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rakshasa-rtorrent";
|
||||
version = "0.9.8+date=2021-08-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rakshasa";
|
||||
repo = "rtorrent";
|
||||
rev = "a6bc99bb821d86b3b0633552db3fbd0a22497657";
|
||||
hash = "sha256-HTwAs8dfZVXfLRNiT6QpjKGnuahHfoMfYWqdKkedUL0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf-archive
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cppunit
|
||||
curl
|
||||
libsigcxx
|
||||
libtool
|
||||
libtorrent
|
||||
ncurses
|
||||
openssl
|
||||
xmlrpc_c
|
||||
zlib
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-xmlrpc-c"
|
||||
"--with-posix-fallocate"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/man/man1 $out/share/doc/rtorrent
|
||||
mv doc/old/rtorrent.1 $out/share/man/man1/rtorrent.1
|
||||
mv doc/rtorrent.rc $out/share/doc/rtorrent/rtorrent.rc
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://rakshasa.github.io/rtorrent/";
|
||||
description = "An ncurses client for libtorrent, ideal for use with screen, tmux, or dtach";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ebzzry codyopel ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, fetchFromGitHub, pkg-config
|
||||
, libtool, autoconf, automake, cppunit
|
||||
, libtorrent, ncurses, libsigcxx, curl
|
||||
, zlib, openssl, xmlrpc_c
|
||||
|
||||
# This no longer works
|
||||
, colorSupport ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rtorrent";
|
||||
version = "0.9.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rakshasa";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0hcaf1brk402caa7hhlb2r1c93mjzxkm8gb19xfl33gkp3jpf372";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
libtool autoconf automake cppunit
|
||||
libtorrent ncurses libsigcxx curl zlib openssl xmlrpc_c
|
||||
];
|
||||
|
||||
# Optional patch adds support for custom configurable colors
|
||||
# https://github.com/Chlorm/chlorm_overlay/blob/master/net-p2p/rtorrent/README.md
|
||||
patches = lib.optional colorSupport (fetchurl {
|
||||
url = "https://gist.githubusercontent.com/codyopel/a816c2993f8013b5f4d6/raw/b952b32da1dcf14c61820dfcf7df00bc8918fec4/rtorrent-color.patch";
|
||||
sha256 = "00gcl7yq6261rrfzpz2k8bd7mffwya0ifji1xqcvhfw50syk8965";
|
||||
});
|
||||
|
||||
preConfigure = "./autogen.sh";
|
||||
|
||||
configureFlags = [ "--with-xmlrpc-c" "--with-posix-fallocate" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/man/man1 $out/share/doc/rtorrent
|
||||
mv doc/old/rtorrent.1 $out/share/man/man1/rtorrent.1
|
||||
mv doc/rtorrent.rc $out/share/doc/rtorrent/rtorrent.rc
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://rakshasa.github.io/rtorrent/";
|
||||
description = "An ncurses client for libtorrent, ideal for use with screen, tmux, or dtach";
|
||||
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ebzzry codyopel ];
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
|
@ -7172,9 +7172,21 @@ with pkgs;
|
|||
|
||||
libnids = callPackage ../tools/networking/libnids { };
|
||||
|
||||
libtorrent = callPackage ../tools/networking/p2p/libtorrent { };
|
||||
rakshasa-rtorrent = recurseIntoAttrs
|
||||
(callPackage ../tools/networking/p2p/rakshasa-rtorrent {
|
||||
callPackage = newScope pkgs.rakshasa-rtorrent;
|
||||
});
|
||||
|
||||
libtorrent-jesec = callPackage ../tools/networking/p2p/libtorrent-jesec { };
|
||||
rtorrent = rakshasa-rtorrent.rtorrent;
|
||||
libtorrent = rakshasa-rtorrent.libtorrent;
|
||||
|
||||
jesec-rtorrent = recurseIntoAttrs
|
||||
(callPackage ../tools/networking/p2p/jesec-rtorrent {
|
||||
callPackage = newScope pkgs.jesec-rtorrent;
|
||||
});
|
||||
|
||||
rtorrent-jesec = jesec-rtorrent.rtorrent;
|
||||
libtorrent-jesec = jesec-rtorrent.libtorrent;
|
||||
|
||||
libmpack = callPackage ../development/libraries/libmpack { };
|
||||
|
||||
|
@ -9010,10 +9022,6 @@ with pkgs;
|
|||
|
||||
rsstail = callPackage ../applications/networking/feedreaders/rsstail { };
|
||||
|
||||
rtorrent = callPackage ../tools/networking/p2p/rtorrent { };
|
||||
|
||||
rtorrent-jesec = callPackage ../tools/networking/p2p/rtorrent-jesec { };
|
||||
|
||||
rubber = callPackage ../tools/typesetting/rubber { };
|
||||
|
||||
rubocop = rubyPackages.rubocop;
|
||||
|
|
Loading…
Reference in a new issue