about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraleksana <me@aleksana.moe>2024-03-01 18:42:34 +0800
committeraleksana <me@aleksana.moe>2024-03-02 00:15:15 +0800
commit86447dd8faeae5a16ce6513698f74bd237d83662 (patch)
tree2feaa26c2e603d3f146052b61dc25aacf38d6778
parent5c31c4a2b64a191a95e0917c84ced8e19cc353f1 (diff)
dialect: 2.1.1 -> 2.2.0
-rw-r--r--pkgs/applications/misc/dialect/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/applications/misc/dialect/default.nix b/pkgs/applications/misc/dialect/default.nix
index 519f12490f18a..9ea194a24cf4b 100644
--- a/pkgs/applications/misc/dialect/default.nix
+++ b/pkgs/applications/misc/dialect/default.nix
@@ -13,24 +13,33 @@
 , gobject-introspection
 , gst_all_1
 , libsoup_3
+, glib-networking
 , libadwaita
 , nix-update-script
 }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "dialect";
-  version = "2.1.1";
+  version = "2.2.0";
 
   format = "other";
 
   src = fetchFromGitHub {
     owner = "dialect-app";
-    repo = pname;
+    repo = "dialect";
     rev = version;
     fetchSubmodules = true;
-    hash = "sha256-ytZnolQTOj0dpv+ouN1N7sypr1LxSN/Uhp7qP0ZOTHE=";
+    hash = "sha256-+0qA+jFYrK3K3mJNvxTvnT/3q4c51H0KgEMjzvV34Zs=";
   };
 
+  # FIXME: remove in next release
+  postPatch = ''
+    substituteInPlace dialect/providers/lingva.py \
+      --replace-fail 'lingva.ml' 'lingva.dialectapp.org'
+    substituteInPlace dialect/providers/libretrans.py \
+      --replace-fail 'libretranslate.de' 'lt.dialectapp.org'
+  '';
+
   nativeBuildInputs = [
     appstream-glib
     blueprint-compiler
@@ -47,7 +56,9 @@ python3.pkgs.buildPythonApplication rec {
     glib
     gst_all_1.gstreamer
     gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
     libsoup_3
+    glib-networking
     libadwaita
   ];
 
@@ -55,6 +66,7 @@ python3.pkgs.buildPythonApplication rec {
     dbus-python
     gtts
     pygobject3
+    beautifulsoup4
   ];
 
   # Prevent double wrapping, let the Python wrapper use the args in preFixup.
@@ -76,6 +88,7 @@ python3.pkgs.buildPythonApplication rec {
     description = "A translation app for GNOME";
     maintainers = with maintainers; [ linsui ];
     license = licenses.gpl3Plus;
+    mainProgram = "dialect";
     platforms = platforms.linux;
   };
 }