2014-11-01 02:30:09 +00:00
|
|
|
# Version specific options
|
2017-10-18 00:51:58 +01:00
|
|
|
{ version, sha256, patches ? [] }:
|
|
|
|
|
|
|
|
{ stdenv, fetchurl, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip, ... }:
|
2014-11-01 02:30:09 +00:00
|
|
|
|
2015-08-13 03:04:40 +01:00
|
|
|
let formattedVersion = lib.replaceChars ["."] ["_"] version;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2014-11-01 02:30:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libtorrent-rasterbar-${version}";
|
2016-06-23 20:04:20 +01:00
|
|
|
|
2014-11-01 02:30:09 +00:00
|
|
|
src = fetchurl {
|
2015-08-13 03:04:40 +01:00
|
|
|
url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
|
2014-11-01 02:30:09 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2017-10-18 00:51:58 +01:00
|
|
|
inherit patches;
|
|
|
|
|
2017-09-05 23:03:42 +01:00
|
|
|
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ boost openssl zlib python libiconv geoip ];
|
2014-11-01 02:30:09 +00:00
|
|
|
|
2015-08-13 03:04:40 +01: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}"
|
2016-04-27 22:41:28 +01:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2014-11-26 23:16:50 +00:00
|
|
|
"--with-libiconv=yes"
|
|
|
|
];
|
2015-08-13 03:04:40 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2016-06-23 20:04:20 +01:00
|
|
|
|
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 ];
|
2017-11-11 16:36:36 +00:00
|
|
|
platforms = platforms.unix;
|
2014-11-01 02:30:09 +00:00
|
|
|
};
|
|
|
|
}
|