2015-08-13 02:04:40 +00:00
|
|
|
{ stdenv, fetchurl, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip
|
2014-11-01 02:30:09 +00:00
|
|
|
# Version specific options
|
|
|
|
, version, sha256
|
|
|
|
, ... }:
|
|
|
|
|
2015-08-13 02:04:40 +00:00
|
|
|
let formattedVersion = lib.replaceChars ["."] ["_"] version;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2014-11-01 02:30:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libtorrent-rasterbar-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2015-08-13 02:04:40 +00:00
|
|
|
url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
|
2014-11-01 02:30:09 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2015-08-13 02:04:40 +00:00
|
|
|
nativeBuildInputs = [automake autoconf libtool ];
|
|
|
|
|
2014-11-26 23:16:50 +00:00
|
|
|
buildInputs = [ boost pkgconfig openssl zlib python libiconv geoip ];
|
2014-11-01 02:30:09 +00:00
|
|
|
|
2015-08-13 02:04:40 +00:00
|
|
|
preConfigure = "./autotool.sh";
|
|
|
|
|
2014-11-01 02:30:09 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-python-binding"
|
|
|
|
"--with-libgeoip=system"
|
|
|
|
"--with-libiconv=yes"
|
|
|
|
"--with-boost=${boost.dev}"
|
|
|
|
"--with-boost-libdir=${boost.lib}/lib"
|
2014-11-26 23:16:50 +00:00
|
|
|
"--with-libiconv=yes"
|
|
|
|
];
|
2015-08-13 02:04:40 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2014-11-01 02:30:09 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.rasterbar.com/products/libtorrent/;
|
|
|
|
description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.phreedom ];
|
|
|
|
};
|
|
|
|
}
|