2018-06-23 01:35:37 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, automake, autoconf, zlib
|
|
|
|
, boost, openssl, libtool, python, libiconv, geoip }:
|
2010-11-13 07:47:04 +00:00
|
|
|
|
2018-06-23 01:35:37 +00:00
|
|
|
let
|
2018-05-01 22:33:06 +00:00
|
|
|
version = "1.1.7";
|
2018-06-23 01:35:37 +00:00
|
|
|
formattedVersion = lib.replaceChars ["."] ["_"] version;
|
2018-07-01 17:48:26 +00:00
|
|
|
|
|
|
|
boostPython = boost.override { enablePython = true; };
|
|
|
|
|
2018-06-23 01:35:37 +00:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "libtorrent-rasterbar-${version}";
|
2018-05-01 22:33:06 +00:00
|
|
|
|
2018-06-23 01:35:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arvidn";
|
|
|
|
repo = "libtorrent";
|
|
|
|
rev = "libtorrent-${formattedVersion}";
|
|
|
|
sha256 = "073nb7yca5jg1i8z5h76qrmddl2hdy8fc1pnchkg574087an31r3";
|
|
|
|
};
|
2018-05-01 22:33:06 +00:00
|
|
|
|
2018-06-23 01:35:37 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/arvidn/libtorrent/commit/64d6b4900448097b0157abb328621dd211e2947d.patch";
|
|
|
|
sha256 = "1bdv0icqzbg1il60sckcly4y22lkdbkkwdjadwdzxv7cdj586bzd";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/arvidn/libtorrent/commit/9cd0ae67e74a507c1b9ff9c057ee97dda38ccb81.patch";
|
|
|
|
sha256 = "1cscqpc6fq9iwspww930dsxf0yb01bgrghzf5hdhl09a87r6q2zg";
|
|
|
|
})
|
|
|
|
];
|
2018-06-22 22:15:20 +00:00
|
|
|
|
2018-06-23 01:35:37 +00:00
|
|
|
enableParallelBuilding = true;
|
2018-05-01 22:33:06 +00:00
|
|
|
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
2018-07-01 17:48:26 +00:00
|
|
|
buildInputs = [ boostPython openssl zlib python libiconv geoip ];
|
2018-05-01 22:33:06 +00:00
|
|
|
preConfigure = "./autotool.sh";
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-python-binding"
|
|
|
|
"--with-libgeoip=system"
|
|
|
|
"--with-libiconv=yes"
|
2018-07-01 17:48:26 +00:00
|
|
|
"--with-boost=${boostPython.dev}"
|
|
|
|
"--with-boost-libdir=${boostPython.out}/lib"
|
2018-05-01 22:33:06 +00:00
|
|
|
"--with-libiconv=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-06-23 06:12:00 +00:00
|
|
|
homepage = "https://libtorrent.org/";
|
2018-05-01 22:33:06 +00:00
|
|
|
description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.phreedom ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|