From ce6d0772903011fce08e347663eedf01d7b153d9 Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 6 May 2021 18:55:40 -0400 Subject: [PATCH 1/2] libtorrent-jesec: init at 0.13.8-r1 --- .../p2p/libtorrent-jesec/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/tools/networking/p2p/libtorrent-jesec/default.nix 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..3858d87e7ed --- /dev/null +++ b/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, fetchFromGitHub, cmake, gtest, openssl, zlib }: + +stdenv.mkDerivation rec { + pname = "libtorrent-jesec"; + version = "0.13.8-r1"; + + src = fetchFromGitHub { + owner = "jesec"; + repo = "libtorrent"; + rev = "v${version}"; + sha256 = "sha256-Eh5pMkSe9uO0dPRWDg2BbbRxxuvX9FM2/OReq/61ojc="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ openssl zlib ]; + + # https://github.com/jesec/libtorrent/issues/1 + doCheck = false; + 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e57409a0b91..881c505c502 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5955,6 +5955,8 @@ in libtorrent = callPackage ../tools/networking/p2p/libtorrent { }; + libtorrent-jesec = callPackage ../tools/networking/p2p/libtorrent-jesec { }; + libmpack = callPackage ../development/libraries/libmpack { }; libiberty = callPackage ../development/libraries/libiberty { }; From 0c6b4f2c75e56798d9fd8dd1f0bd37c4fd960972 Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 6 May 2021 18:57:02 -0400 Subject: [PATCH 2/2] rtorrent-jesec: init at 0.9.8-r11 --- .../networking/p2p/rtorrent-jesec/default.nix | 57 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/tools/networking/p2p/rtorrent-jesec/default.nix 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..4d19a82eb3c --- /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-r10"; + + src = fetchFromGitHub { + owner = "jesec"; + repo = "rtorrent"; + rev = "v${version}"; + sha256 = "sha256-Ge5W1rLaneUA7LxnBuMO/jQlqLOUKFf3gaAAlRr/qeM="; + }; + + 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 881c505c502..bfbe970074b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7585,6 +7585,8 @@ in rtorrent = callPackage ../tools/networking/p2p/rtorrent { }; + rtorrent-jesec = callPackage ../tools/networking/p2p/rtorrent-jesec { }; + rubber = callPackage ../tools/typesetting/rubber { }; rubocop = callPackage ../development/tools/rubocop { };