summary refs log tree commit diff
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2018-08-06 16:22:51 -0500
committerAustin Seipp <aseipp@pobox.com>2018-08-06 16:23:36 -0500
commitd8e62d202dd92d5bd4562742e241b621bc0cab48 (patch)
treefd4ca77f31b9c09d7ed66815f04728b78763f0bd
parent937e402b355539f318d17da614c5516879ce646b (diff)
downloadnixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.tar
nixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.tar.gz
nixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.tar.bz2
nixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.tar.lz
nixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.tar.xz
nixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.tar.zst
nixlib-d8e62d202dd92d5bd4562742e241b621bc0cab48.zip
libtorrentRasterbar: multi outputs, install python2/3 bindings
Signed-off-by: Austin Seipp <aseipp@pobox.com>
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/default.nix18
-rw-r--r--pkgs/top-level/python-packages.nix4
2 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
index 39860414791c..f19e9d274313 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 13cf481a16f4..c9f0f6ba995a 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -17568,6 +17568,10 @@ EOF
   foundationdb60 = (toPythonModule (pkgs.fdbPackages.override {
     inherit python;
   }).foundationdb60).python;
+
+  libtorrentRasterbar = (toPythonModule (pkgs.libtorrentRasterbar.override {
+    inherit python;
+  })).python;
 });
 
 in fix' (extends overrides packages)