about summary refs log tree commit diff
path: root/pkgs/by-name/rt
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2024-06-25 11:36:35 -0300
committerThiago Kenji Okada <thiagokokada@gmail.com>2024-06-25 11:46:20 -0300
commit2293f663f8fc74f6b2f4b1807e69cd3c3e93e2ff (patch)
treefa74640631bba244540156e95eb5bdef3df19f40 /pkgs/by-name/rt
parent88dd45844f5bf582050e2e3ce007729c964b9396 (diff)
rtorrent: move to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/rt')
-rw-r--r--pkgs/by-name/rt/rtorrent/package.nix81
1 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/by-name/rt/rtorrent/package.nix b/pkgs/by-name/rt/rtorrent/package.nix
new file mode 100644
index 0000000000000..f55c989eee6d2
--- /dev/null
+++ b/pkgs/by-name/rt/rtorrent/package.nix
@@ -0,0 +1,81 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, autoconf-archive
+, cppunit
+, curl
+, libsigcxx
+, libtool
+, libtorrent
+, ncurses
+, openssl
+, pkg-config
+, xmlrpc_c
+, zlib
+, nixosTests
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation {
+  pname = "rakshasa-rtorrent";
+  version = "0.9.8-unstable-2023-03-16";
+
+  src = fetchFromGitHub {
+    owner = "rakshasa";
+    repo = "rtorrent";
+    rev = "1da0e3476dcabbf74b2e836d6b4c37b4d96bde09";
+    hash = "sha256-OXOZSMuNAU+VGwNyyfzcmkTRjDJq9HsKUNxZDYpSvFQ=";
+  };
+
+  passthru = {
+    inherit libtorrent;
+  };
+
+  nativeBuildInputs = [
+    autoconf-archive
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    cppunit
+    curl
+    libsigcxx
+    libtool
+    libtorrent
+    ncurses
+    openssl
+    xmlrpc_c
+    zlib
+  ];
+
+  configureFlags = [
+    "--with-xmlrpc-c"
+    "--with-posix-fallocate"
+  ];
+
+  passthru = {
+    updateScript = unstableGitUpdater { tagPrefix = "v"; };
+    tests = {
+      inherit (nixosTests) rtorrent;
+    };
+  };
+
+  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 = "Ncurses client for libtorrent, ideal for use with screen, tmux, or dtach";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ebzzry codyopel thiagokokada ];
+    platforms = platforms.unix;
+    mainProgram = "rtorrent";
+  };
+}