summary refs log tree commit diff
path: root/pkgs/development/libraries/libtorrent-rasterbar/generic.nix
blob: d0b69e0348fc7ea5f9e4583bc51fb288ce80180c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ stdenv, fetchurl, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip
# Version specific options
, version, sha256
, ... }:

let formattedVersion = lib.replaceChars ["."] ["_"] version;

in

stdenv.mkDerivation rec {
  name = "libtorrent-rasterbar-${version}";

  src = fetchurl {
    url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
    inherit sha256;
  };

  nativeBuildInputs = [automake autoconf libtool ];

  buildInputs = [ boost pkgconfig openssl zlib python libiconv geoip ];

  preConfigure = "./autotool.sh";

  configureFlags = [ 
    "--enable-python-binding"
    "--with-libgeoip=system"
    "--with-libiconv=yes"
    "--with-boost=${boost.dev}"
    "--with-boost-libdir=${boost.out}/lib"
    "--with-libiconv=yes"
  ];

  enableParallelBuilding = true;

  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 ];
    platforms = platforms.linux;
  };
}