about summary refs log tree commit diff
path: root/pkgs/development/libraries/libtorrent-rasterbar/generic.nix
blob: c112ab65a20dbd5365de16b3df70f22220ef456f (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
43
44
45
# Version specific options
{ version, sha256, patches ? [] }:

{ stdenv, fetchurl, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip, ... }:

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;
  };

  inherit patches;

  nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
  buildInputs = [ boost 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;

  doCheck = false; # fails to link

  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.unix;
  };
}