Merge pull request #198740 from pongo1231/krunner-translator

This commit is contained in:
Sandro 2023-01-27 00:14:07 +01:00 committed by GitHub
commit 9d66610fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 0 deletions

View file

@ -11463,6 +11463,12 @@
githubId = 138074;
name = "Pedro Pombeiro";
};
pongo1231 = {
email = "pongo1999712@gmail.com";
github = "pongo1231";
githubId = 4201956;
name = "pongo1231";
};
poscat = {
email = "poscat@mail.poscat.moe";
github = "poscat0x04";

View file

@ -0,0 +1,54 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, extra-cmake-modules
, krunner
, kconfigwidgets
, ktextwidgets
, kservice
, ki18n
, translate-shell
, qtbase
, qtdeclarative
, qtlocation
}:
stdenv.mkDerivation rec {
pname = "krunner-translator";
version = "1.5.0";
src = fetchFromGitHub {
owner = "naraesk";
repo = pname;
rev = "v${version}";
sha256 = "8MusGvNhTxa8Sm8WiSwRaVIfZOeXmgcO4T6H9LqFGLs=";
};
nativeBuildInputs = [ cmake extra-cmake-modules ];
dontWrapQtApps = true;
buildInputs = [
krunner
kconfigwidgets
ktextwidgets
kservice
ki18n
qtbase
qtdeclarative
qtlocation
];
postPatch = ''
substituteInPlace src/translateShellProcess.cpp --replace "start(\"trans\", arguments);" "start(\"${translate-shell}/bin/trans\", arguments);"
'';
meta = with lib; {
description = "A plugin for KRunner which integrates a translator, supports Google Translate, Bing Translator, youdao and Baidu Fanyi";
homepage = "https://github.com/naraesk/krunner-translator";
license = licenses.gpl3;
maintainers = with maintainers; [ pongo1231 ];
platforms = platforms.unix;
};
}

View file

@ -8734,6 +8734,8 @@ with pkgs;
krunner-pass = libsForQt5.callPackage ../tools/security/krunner-pass { };
krunner-translator = libsForQt5.callPackage ../tools/misc/krunner-translator { };
krunvm = callPackage ../applications/virtualization/krunvm {
inherit (darwin) sigtool;
};