1 { lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf
2 , zlib, boost, openssl, libtool, python, libiconv, ncurses, SystemConfiguration
8 # Make sure we override python, so the correct version is chosen
9 # for the bindings, if overridden
10 boostPython = boost.override { enablePython = true; inherit python; };
12 in stdenv.mkDerivation {
13 pname = "libtorrent-rasterbar";
16 src = fetchFromGitHub {
20 sha256 = "05qm8mcyxsnb6zb8nckln1gkk8ncwzfhsz7d7p3fhx6gdsc8j71b";
23 enableParallelBuilding = true;
25 nativeBuildInputs = [ automake autoconf libtool pkg-config ];
27 buildInputs = [ boostPython openssl zlib python libiconv ncurses ]
28 ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
30 preConfigure = "./autotool.sh";
33 moveToOutput "include" "$dev"
34 moveToOutput "lib/${python.libPrefix}" "$python"
37 outputs = [ "out" "dev" "python" ];
40 "--enable-python-binding"
42 "--with-boost=${boostPython.dev}"
43 "--with-boost-libdir=${boostPython.out}/lib"
47 homepage = "https://libtorrent.org/";
48 description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
49 license = licenses.bsd3;
51 broken = stdenv.isDarwin;
52 platforms = platforms.unix;