From 9ae8499342e57f840ff3803194d8bd76f34abf21 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 5 Jul 2019 19:43:54 -0500 Subject: [PATCH] deluge: 1.3.15 -> 2.0.3 * let's try 2.0 version now, no time better than the present! Maybe! * bz2 -> xz * maybe python3 * disable pyGtkGlade for deps, maybe not needed? * fix gtk/etc deps, deluge-gtk works! \o/ * restore installation of images and such The old version is kept available as some torrent trackers have not updated their whitelists yet. --- .../networking/p2p/deluge/{ => 1}/default.nix | 0 .../networking/p2p/deluge/2/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 11 +++-- 3 files changed, 52 insertions(+), 3 deletions(-) rename pkgs/applications/networking/p2p/deluge/{ => 1}/default.nix (100%) create mode 100644 pkgs/applications/networking/p2p/deluge/2/default.nix diff --git a/pkgs/applications/networking/p2p/deluge/default.nix b/pkgs/applications/networking/p2p/deluge/1/default.nix similarity index 100% rename from pkgs/applications/networking/p2p/deluge/default.nix rename to pkgs/applications/networking/p2p/deluge/1/default.nix diff --git a/pkgs/applications/networking/p2p/deluge/2/default.nix b/pkgs/applications/networking/p2p/deluge/2/default.nix new file mode 100644 index 00000000000..4603f0bd715 --- /dev/null +++ b/pkgs/applications/networking/p2p/deluge/2/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, intltool, libtorrentRasterbar, pythonPackages +, gtk3, gobjectIntrospection, librsvg, wrapGAppsHook }: + +pythonPackages.buildPythonPackage rec { + pname = "deluge"; + version = "2.0.3"; + + src = fetchurl { + url = "http://download.deluge-torrent.org/source/2.0/${pname}-${version}.tar.xz"; + sha256 = "14d8kn2pvr1qv8mwqrxmj85jycr73vwfqz12hzag0ararbkfhyky"; + }; + + propagatedBuildInputs = with pythonPackages; [ + twisted Mako chardet pyxdg pyopenssl service-identity + libtorrentRasterbar.dev libtorrentRasterbar.python setuptools + setproctitle pillow rencode six zope_interface + dbus-python pygobject3 pycairo + gtk3 gobjectIntrospection librsvg + ]; + + nativeBuildInputs = [ intltool wrapGAppsHook ]; + + checkInputs = with pythonPackages; [ + pytest /* pytest-twisted */ pytestcov mock + mccabe pylint + ]; + + doCheck = false; # until pytest-twisted is packaged + + postInstall = '' + mkdir -p $out/share/applications + cp -R deluge/ui/data/pixmaps $out/share/ + cp -R deluge/ui/data/icons $out/share/ + cp deluge/ui/data/share/applications/deluge.desktop $out/share/applications + ''; + + meta = with stdenv.lib; { + homepage = "https://deluge-torrent.org"; + description = "Torrent client"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ domenkozar ebzzry ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c34cc9ac16..8b55ad38a59 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2839,10 +2839,15 @@ in ddrutility = callPackage ../tools/system/ddrutility { }; - deluge = callPackage ../applications/networking/p2p/deluge { - libtorrentRasterbar = libtorrentRasterbar-1_1_x; - pythonPackages = python2Packages; + deluge-2_x = callPackage ../applications/networking/p2p/deluge/2 { + pythonPackages = python3Packages; + libtorrentRasterbar = libtorrentRasterbar.override { python = python3; }; }; + deluge-1_x = callPackage ../applications/networking/p2p/deluge/1 { + pythonPackages = python2Packages; + libtorrentRasterbar = libtorrentRasterbar-1_1_x; + }; + deluge = deluge-2_x; desktop-file-utils = callPackage ../tools/misc/desktop-file-utils { };