nixpkgs/pkgs/tools/networking/p2p/rtorrent/default.nix

52 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fetchFromGitHub, pkgconfig
, libtool, autoconf, automake, cppunit
, libtorrent, ncurses, libsigcxx, curl
, zlib, openssl, xmlrpc_c
# This no longer works
, colorSupport ? false
}:
stdenv.mkDerivation rec {
2015-09-14 18:48:12 +00:00
name = "rtorrent-${version}";
version = "20161023";
src = fetchFromGitHub {
owner = "rakshasa";
repo = "rtorrent";
rev = "226e670decf92e7adaa845a6982aca4f164ea740";
sha256 = "0cxyakc09bn6wjfj42gh508hc62awx825skzacpizx2bqs6v7xvb";
};
nativeBuildInputs = [ pkgconfig ];
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 = stdenv.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" ];
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
'';
2015-09-14 18:48:12 +00:00
meta = with stdenv.lib; {
2015-12-07 21:30:55 +00:00
inherit (src.meta) homepage;
2015-09-14 18:48:12 +00:00
description = "An ncurses client for libtorrent, ideal for use with screen, tmux, or dtach";
2015-09-14 18:48:12 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ ebzzry codyopel ];
};
}