2018-08-07 00:47:42 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, automake, autoconf
|
|
|
|
, zlib, boost, openssl, libtool, python, libiconv, geoip, ncurses
|
|
|
|
}:
|
2010-11-13 08:47:04 +01:00
|
|
|
|
2018-06-23 03:35:37 +02:00
|
|
|
let
|
2018-10-14 14:57:20 +02:00
|
|
|
version = "1.1.10";
|
2018-06-23 03:35:37 +02:00
|
|
|
formattedVersion = lib.replaceChars ["."] ["_"] version;
|
2018-07-01 19:48:26 +02:00
|
|
|
|
2018-08-07 00:47:42 +02:00
|
|
|
# Make sure we override python, so the correct version is chosen
|
|
|
|
# for the bindings, if overridden
|
|
|
|
boostPython = boost.override { enablePython = true; inherit python; };
|
2018-07-01 19:48:26 +02:00
|
|
|
|
2018-06-23 03:35:37 +02:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "libtorrent-rasterbar-${version}";
|
2018-05-02 00:33:06 +02:00
|
|
|
|
2018-06-23 03:35:37 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arvidn";
|
|
|
|
repo = "libtorrent";
|
|
|
|
rev = "libtorrent-${formattedVersion}";
|
2018-10-14 14:57:20 +02:00
|
|
|
sha256 = "0qj1rz52jk95m43cr7l3fi9jmf4pwxncp5mq4hi2vzacfnf79yms";
|
2018-06-23 03:35:37 +02:00
|
|
|
};
|
2018-05-02 00:33:06 +02:00
|
|
|
|
2018-06-23 03:35:37 +02:00
|
|
|
enableParallelBuilding = true;
|
2018-05-02 00:33:06 +02:00
|
|
|
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
2018-08-07 00:47:42 +02:00
|
|
|
buildInputs = [ boostPython openssl zlib python libiconv geoip ncurses ];
|
2018-05-02 00:33:06 +02:00
|
|
|
preConfigure = "./autotool.sh";
|
|
|
|
|
2018-08-07 00:47:42 +02:00
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "include" "$dev"
|
|
|
|
moveToOutput "lib/${python.libPrefix}" "$python"
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "python" ];
|
|
|
|
|
2018-05-02 00:33:06 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-python-binding"
|
|
|
|
"--with-libgeoip=system"
|
|
|
|
"--with-libiconv=yes"
|
2018-07-01 19:48:26 +02:00
|
|
|
"--with-boost=${boostPython.dev}"
|
|
|
|
"--with-boost-libdir=${boostPython.out}/lib"
|
2018-05-02 00:33:06 +02:00
|
|
|
"--with-libiconv=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-06-23 08:12:00 +02:00
|
|
|
homepage = "https://libtorrent.org/";
|
2018-05-02 00:33:06 +02:00
|
|
|
description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.phreedom ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|