From dc903c15e649d22791ec415b988ea07180d0118c Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Mon, 5 Sep 2022 20:29:13 +0300 Subject: [PATCH] =?UTF-8?q?crow-translate:=202.9.12=20=E2=86=92=202.10.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../misc/crow-translate/default.nix | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/crow-translate/default.nix b/pkgs/applications/misc/crow-translate/default.nix index 37ad59eb0207..f05c8bdcb2d0 100644 --- a/pkgs/applications/misc/crow-translate/default.nix +++ b/pkgs/applications/misc/crow-translate/default.nix @@ -12,15 +12,18 @@ , qtx11extras , qttranslations , wrapQtAppsHook +, gst_all_1 +, testers +, crow-translate }: stdenv.mkDerivation rec { pname = "crow-translate"; - version = "2.9.12"; + version = "2.10.0"; src = fetchzip { url = "https://github.com/${pname}/${pname}/releases/download/${version}/${pname}-${version}-source.tar.gz"; - hash = "sha256-JkAykc5j5HMkK48qAm876A2zBD095CG/yR4TyXAdevM="; + hash = "sha256-ayEt4PI15NjlmFrDEa6Ipbn94nN9Ga7jThnIVBWPgKw="; }; patches = [ @@ -31,6 +34,11 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + substituteInPlace data/io.crow_translate.CrowTranslate.desktop \ + --replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus" + ''; + nativeBuildInputs = [ cmake extra-cmake-modules @@ -44,18 +52,27 @@ stdenv.mkDerivation rec { tesseract4 qtmultimedia qtx11extras - ]; + ] ++ (with gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-good + gst-plugins-bad + ]); - postInstall = '' - substituteInPlace $out/share/applications/io.crow_translate.CrowTranslate.desktop \ - --replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus" + preFixup = '' + qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") ''; + passthru.tests.version = testers.testVersion { + package = crow-translate; + }; + meta = with lib; { description = "A simple and lightweight translator that allows to translate and speak text using Google, Yandex and Bing"; homepage = "https://crow-translate.github.io/"; license = licenses.gpl3Plus; maintainers = with maintainers; [ sikmir ]; platforms = platforms.linux; + mainProgram = "crow"; }; }