From ca722c5e2bd661a0175296249ddad9e29acc7618 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 5 Jul 2019 21:29:09 -0500 Subject: [PATCH] libtorrent-rasterbar: 1.1.11 -> 1.2.5 https://raw.githubusercontent.com/arvidn/libtorrent/libtorrent-1_2_5/ChangeLog The old release is kept available as libtorrentRasterbar-1_1_x for deluge 1.x. --- .../{ => 1.1}/default.nix | 6 +-- .../libtorrent-rasterbar/1.2/default.nix | 50 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 7 ++- 3 files changed, 58 insertions(+), 5 deletions(-) rename pkgs/development/libraries/libtorrent-rasterbar/{ => 1.1}/default.nix (87%) create mode 100644 pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/1.1/default.nix similarity index 87% rename from pkgs/development/libraries/libtorrent-rasterbar/default.nix rename to pkgs/development/libraries/libtorrent-rasterbar/1.1/default.nix index 26605eb41dbd..b2c958795f3e 100644 --- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix +++ b/pkgs/development/libraries/libtorrent-rasterbar/1.1/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, pkgconfig, automake, autoconf -, zlib, boost, openssl, libtool, python, libiconv, geoip, ncurses +, zlib, boost, openssl, libtool, python, libiconv, ncurses }: let @@ -23,7 +23,7 @@ in stdenv.mkDerivation { enableParallelBuilding = true; nativeBuildInputs = [ automake autoconf libtool pkgconfig ]; - buildInputs = [ boostPython openssl zlib python libiconv geoip ncurses ]; + buildInputs = [ boostPython openssl zlib python libiconv ncurses ]; preConfigure = "./autotool.sh"; postInstall = '' @@ -35,11 +35,9 @@ in stdenv.mkDerivation { configureFlags = [ "--enable-python-binding" - "--with-libgeoip=system" "--with-libiconv=yes" "--with-boost=${boostPython.dev}" "--with-boost-libdir=${boostPython.out}/lib" - "--with-libiconv=yes" ]; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix new file mode 100644 index 000000000000..8b9992ec66d4 --- /dev/null +++ b/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix @@ -0,0 +1,50 @@ +{ stdenv, lib, fetchFromGitHub, pkgconfig, automake, autoconf +, zlib, boost, openssl, libtool, python, libiconv, ncurses +}: + +let + version = "1.2.5"; + formattedVersion = lib.replaceChars ["."] ["_"] version; + + # 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 { + pname = "libtorrent-rasterbar"; + inherit version; + + src = fetchFromGitHub { + owner = "arvidn"; + repo = "libtorrent"; + rev = "libtorrent-${formattedVersion}"; + sha256 = "0y2fzqbvb1bxvf93d7sphwzxih6j40p5p3fay943k26w0nrq802w"; + }; + + enableParallelBuilding = true; + nativeBuildInputs = [ automake autoconf libtool pkgconfig ]; + buildInputs = [ boostPython openssl zlib python libiconv ncurses ]; + preConfigure = "./autotool.sh"; + + postInstall = '' + moveToOutput "include" "$dev" + moveToOutput "lib/${python.libPrefix}" "$python" + ''; + + outputs = [ "out" "dev" "python" ]; + + configureFlags = [ + "--enable-python-binding" + "--with-libiconv=yes" + "--with-boost=${boostPython.dev}" + "--with-boost-libdir=${boostPython.out}/lib" + ]; + + meta = with stdenv.lib; { + homepage = "https://libtorrent.org/"; + description = "A C++ BitTorrent implementation focusing on efficiency and scalability"; + license = licenses.bsd3; + maintainers = [ maintainers.phreedom ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4c06da57b81..1c34cc9ac161 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2840,6 +2840,7 @@ in ddrutility = callPackage ../tools/system/ddrutility { }; deluge = callPackage ../applications/networking/p2p/deluge { + libtorrentRasterbar = libtorrentRasterbar-1_1_x; pythonPackages = python2Packages; }; @@ -13241,7 +13242,11 @@ in libtomcrypt = callPackage ../development/libraries/libtomcrypt { }; - libtorrentRasterbar = callPackage ../development/libraries/libtorrent-rasterbar { }; + libtorrentRasterbar-1_2_x = callPackage ../development/libraries/libtorrent-rasterbar/1.2 { }; + + libtorrentRasterbar-1_1_x = callPackage ../development/libraries/libtorrent-rasterbar/1.1 { }; + + libtorrentRasterbar = libtorrentRasterbar-1_2_x; # this is still the new version of the old API libtoxcore-new = callPackage ../development/libraries/libtoxcore/new-api.nix { };