@@ -1,6 +1,37 @@
1−args@{ callPackage, ... }:
1+{ stdenv, fetchurl, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip, ... }:
22
3−callPackage (import ./generic.nix {
4− version = "1.1.6";
5− sha256 = "1xlh0sqypjbx0imw3bkbjwgwb4bm6zl7c0y01p0xsw8ncfmwjll7";
6−}) args
3+stdenv.mkDerivation rec {
4+ name = "libtorrent-rasterbar-${version}";
5+ version = "1.1.7";
6+
7+ src =
8+ let formattedVersion = lib.replaceChars ["."] ["_"] version;
9+ in fetchurl {
10+ url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
11+ sha256 = "0vbw7wcw8x9787rq5fwaibpvvspm3237l8ahbf20gjpzxhn4yfwc";
12+ };
13+
14+ nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
15+ buildInputs = [ boost openssl zlib python libiconv geoip ];
16+
17+ preConfigure = "./autotool.sh";
18+
19+ configureFlags = [
20+ "--enable-python-binding"
21+ "--with-libgeoip=system"
22+ "--with-libiconv=yes"
23+ "--with-boost=${boost.dev}"
24+ "--with-boost-libdir=${boost.out}/lib"
25+ "--with-libiconv=yes"
26+ ];
27+
28+ enableParallelBuilding = true;
29+
30+ meta = with stdenv.lib; {
31+ homepage = http://www.rasterbar.com/products/libtorrent/;
32+ description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
33+ license = licenses.bsd3;
34+ maintainers = [ maintainers.phreedom ];
35+ platforms = platforms.unix;
36+ };
37+}