diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/tools/networking/p2p/rtorrent-jesec/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-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/rtorrent-jesec/default.nix')
-rw-r--r-- | pkgs/tools/networking/p2p/rtorrent-jesec/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
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; + }; +} |