summary refs log tree commit diff
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2018-08-06 17:47:42 -0500
committerAustin Seipp <aseipp@pobox.com>2018-08-07 18:40:39 -0500
commitd3b51ab973a1e0d30b396c9ca875a68f67a1f44f (patch)
tree84277045d67dd26757e7c221a82ef3b619ce8b43
parentfbb60556f8d831b00966129cda31fba032cfc2df (diff)
libtorrentRasterbar: multi outputs, install python2/3 bindings
Also fixes the Deluge build, which relied on .out and .python
being the same.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
-rw-r--r--pkgs/applications/networking/p2p/deluge/default.nix3
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/default.nix18
-rw-r--r--pkgs/top-level/python-packages.nix4
3 files changed, 20 insertions, 5 deletions
diff --git a/pkgs/applications/networking/p2p/deluge/default.nix b/pkgs/applications/networking/p2p/deluge/default.nix
index ca4014ed31c31..f58f7e04e00b6 100644
--- a/pkgs/applications/networking/p2p/deluge/default.nix
+++ b/pkgs/applications/networking/p2p/deluge/default.nix
@@ -18,7 +18,8 @@ pythonPackages.buildPythonPackage rec {
   ];
 
   propagatedBuildInputs = with pythonPackages; [
-    pyGtkGlade libtorrentRasterbar twisted Mako chardet pyxdg pyopenssl service-identity
+    pyGtkGlade twisted Mako chardet pyxdg pyopenssl service-identity
+    libtorrentRasterbar.dev libtorrentRasterbar.python
   ];
 
   nativeBuildInputs = [ intltool ];
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
index 39860414791cc..f19e9d274313d 100644
--- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix
+++ b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
@@ -1,11 +1,14 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, automake, autoconf, zlib
-, boost, openssl, libtool, python, libiconv, geoip }:
+{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, automake, autoconf
+, zlib, boost, openssl, libtool, python, libiconv, geoip, ncurses
+}:
 
 let
   version = "1.1.9";
   formattedVersion = lib.replaceChars ["."] ["_"] version;
 
-  boostPython = boost.override { enablePython = true; };
+  # Make sure we override python, so the correct version is chosen
+  # for the bindings, if overridden
+  boostPython = boost.override { enablePython = true; inherit python; };
 
 in stdenv.mkDerivation {
   name = "libtorrent-rasterbar-${version}";
@@ -19,9 +22,16 @@ in stdenv.mkDerivation {
 
   enableParallelBuilding = true;
   nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
-  buildInputs = [ boostPython openssl zlib python libiconv geoip ];
+  buildInputs = [ boostPython openssl zlib python libiconv geoip ncurses ];
   preConfigure = "./autotool.sh";
 
+  postInstall = ''
+    moveToOutput "include" "$dev"
+    moveToOutput "lib/${python.libPrefix}" "$python"
+  '';
+
+  outputs = [ "out" "dev" "python" ];
+
   configureFlags = [
     "--enable-python-binding"
     "--with-libgeoip=system"
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 1355d58e0e7a7..af1895d9d1470 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -17490,6 +17490,10 @@ EOF
   foundationdb60 = (toPythonModule (pkgs.fdbPackages.override {
     inherit python;
   }).foundationdb60).python;
+
+  libtorrentRasterbar = (toPythonModule (pkgs.libtorrentRasterbar.override {
+    inherit python;
+  })).python;
 });
 
 in fix' (extends overrides packages)