From d3b51ab973a1e0d30b396c9ca875a68f67a1f44f Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 6 Aug 2018 17:47:42 -0500 Subject: 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 --- .../libraries/libtorrent-rasterbar/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'pkgs/development/libraries/libtorrent-rasterbar') 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" -- cgit 1.4.1