summary refs log tree commit diff
path: root/pkgs/development/libraries/libtorrent-rasterbar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libtorrent-rasterbar/default.nix')
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/default.nix43
1 files changed, 38 insertions, 5 deletions
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
index 00ec2298617..335400b80ef 100644
--- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix
+++ b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
@@ -1,6 +1,39 @@
-args@{ callPackage, ... }:
+{ stdenv, fetchurl, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip, ... }:
 
-callPackage (import ./generic.nix {
-  version = "1.1.6";
-  sha256 = "1xlh0sqypjbx0imw3bkbjwgwb4bm6zl7c0y01p0xsw8ncfmwjll7";
-}) args
+stdenv.mkDerivation rec {
+  name = "libtorrent-rasterbar-${version}";
+  version = "1.1.7";
+
+  src =
+    let formattedVersion = lib.replaceChars ["."] ["_"] version;
+    in fetchurl {
+      url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
+      sha256 = "0vbw7wcw8x9787rq5fwaibpvvspm3237l8ahbf20gjpzxhn4yfwc";
+    };
+
+  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;
+  };
+}