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 { };