about summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p/deluge
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2021-03-29 18:25:56 +0800
committerGitHub <noreply@github.com>2021-03-29 18:25:56 +0800
commit46aff9e1a018e7c46d029b4f3d684ad8f85f5d84 (patch)
tree6801b364c57206be22ce4a93446aa27ccff6610c /pkgs/applications/networking/p2p/deluge
parent522590bf3f294de0dc8191ce74fb7031813dc2e7 (diff)
deluge: shut up ngettext error on webui start (#115055)
* deluge: shut up ngettext error on webui start
Diffstat (limited to 'pkgs/applications/networking/p2p/deluge')
-rw-r--r--pkgs/applications/networking/p2p/deluge/default.nix68
1 files changed, 55 insertions, 13 deletions
diff --git a/pkgs/applications/networking/p2p/deluge/default.nix b/pkgs/applications/networking/p2p/deluge/default.nix
index 4587da48a4a0d..2bd3cd739e666 100644
--- a/pkgs/applications/networking/p2p/deluge/default.nix
+++ b/pkgs/applications/networking/p2p/deluge/default.nix
@@ -1,5 +1,15 @@
-{ lib, fetchurl, intltool, libtorrent-rasterbar, pythonPackages
-, gtk3, glib, gobject-introspection, librsvg, wrapGAppsHook }:
+{ lib
+, fetchurl
+, fetchpatch
+, intltool
+, libtorrent-rasterbar
+, pythonPackages
+, gtk3
+, glib
+, gobject-introspection
+, librsvg
+, wrapGAppsHook
+}:
 
 pythonPackages.buildPythonPackage rec {
   pname = "deluge";
@@ -10,28 +20,60 @@ pythonPackages.buildPythonPackage rec {
     sha256 = "14d8kn2pvr1qv8mwqrxmj85jycr73vwfqz12hzag0ararbkfhyky";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/deluge-torrent/deluge/commit/d6c96d629183e8bab2167ef56457f994017e7c85.patch";
+      sha256 = "sha256-slGMt2bgp36pjDztJUXFeZNbzdJsus0s9ARRD6IpNUw=";
+      name = "fix_ngettext_warning.patch";
+    })
+
+    (fetchpatch {
+      url = "https://github.com/deluge-torrent/deluge/commit/351664ec071daa04161577c6a1c949ed0f2c3206.patch";
+      sha256 = "sha256-ry1LFgMe9lys66xAvATcPqIa3rzBPWVnsf8FL1dXkHo=";
+      name = "fix_logging_on_py38.patch";
+    })
+  ];
+
   propagatedBuildInputs = with pythonPackages; [
-    twisted Mako chardet pyxdg pyopenssl service-identity
-    libtorrent-rasterbar.dev libtorrent-rasterbar.python setuptools
-    setproctitle pillow rencode six zope_interface
-    dbus-python pygobject3 pycairo
-    gtk3 gobject-introspection librsvg
+    twisted
+    Mako
+    chardet
+    pyxdg
+    pyopenssl
+    service-identity
+    libtorrent-rasterbar.dev
+    libtorrent-rasterbar.python
+    setuptools
+    setproctitle
+    pillow
+    rencode
+    six
+    zope_interface
+    dbus-python
+    pygobject3
+    pycairo
+    gtk3
+    gobject-introspection
+    librsvg
   ];
 
   nativeBuildInputs = [ intltool wrapGAppsHook glib ];
 
   checkInputs = with pythonPackages; [
-    pytest /* pytest-twisted */ pytestcov mock
-    mccabe pylint
+    pytestCheckHook
+    pytest-twisted
+    pytest-cov
+    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
+    mkdir -p $out/share
+    cp -R deluge/ui/data/{icons,pixmaps} $out/share/
+    install -Dm444 -t $out/share/applications deluge/ui/data/share/applications/deluge.desktop
   '';
 
   meta = with lib; {