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