nixpkgs/pkgs/by-name/cr/crow-translate/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.5 KiB
Nix
Raw Normal View History

2021-01-15 05:42:41 +00:00
{ lib
2022-05-10 23:10:13 +00:00
, stdenv
2024-09-18 22:50:19 +00:00
, fetchFromGitLab
2020-11-29 22:17:24 +00:00
, cmake
, extra-cmake-modules
, leptonica
2024-10-26 09:31:29 +00:00
, libsForQt5
, qt5
2020-11-29 22:17:24 +00:00
, tesseract4
2022-09-05 17:29:13 +00:00
, gst_all_1
, testers
2020-11-29 22:17:24 +00:00
}:
2022-05-10 23:10:13 +00:00
2024-09-18 22:50:19 +00:00
stdenv.mkDerivation (finalAttrs: {
2020-11-29 22:17:24 +00:00
pname = "crow-translate";
2024-10-26 09:13:22 +00:00
version = "3.1.0";
2020-11-29 22:17:24 +00:00
2024-09-18 22:50:19 +00:00
src = fetchFromGitLab {
domain = "invent.kde.org";
owner = "office";
repo = "crow-translate";
rev = "v${finalAttrs.version}";
2024-10-26 09:13:22 +00:00
hash = "sha256-zL+Ucw6rzIoEaBHi/uqKQB0cnR6aAcF8MPOG3hwK3iA=";
2024-09-18 22:50:19 +00:00
fetchSubmodules = true;
2020-11-29 22:17:24 +00:00
};
2022-09-05 17:29:13 +00:00
postPatch = ''
2024-09-18 22:50:19 +00:00
substituteInPlace data/org.kde.CrowTranslate.desktop.in \
2024-10-26 09:31:29 +00:00
--subst-var-by QT_BIN_DIR ${lib.getBin qt5.qttools}/bin
2022-09-05 17:29:13 +00:00
'';
2022-05-19 13:33:25 +00:00
nativeBuildInputs = [
cmake
extra-cmake-modules
2024-10-26 09:31:29 +00:00
qt5.qttools
qt5.wrapQtAppsHook
2022-05-19 13:33:25 +00:00
];
2020-11-29 22:17:24 +00:00
2022-05-19 13:33:25 +00:00
buildInputs = [
2024-10-26 09:31:29 +00:00
libsForQt5.kwayland
2022-05-19 13:33:25 +00:00
leptonica
tesseract4
2024-10-26 09:31:29 +00:00
qt5.qtmultimedia
qt5.qtx11extras
2022-09-05 17:29:13 +00:00
] ++ (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
]);
2020-11-29 22:17:24 +00:00
2022-09-05 17:29:13 +00:00
preFixup = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
2021-02-04 23:02:12 +00:00
'';
2022-09-05 17:29:13 +00:00
passthru.tests.version = testers.testVersion {
2024-09-18 22:50:19 +00:00
package = finalAttrs.finalPackage;
2022-09-05 17:29:13 +00:00
};
2024-09-18 22:50:19 +00:00
meta = {
2020-11-29 22:17:24 +00:00
description = "Simple and lightweight translator that allows to translate and speak text using Google, Yandex and Bing";
2024-09-18 22:50:19 +00:00
homepage = "https://invent.kde.org/office/crow-translate";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ sikmir ];
platforms = lib.platforms.linux;
2022-09-05 17:29:13 +00:00
mainProgram = "crow";
2020-11-29 22:17:24 +00:00
};
2024-09-18 22:50:19 +00:00
})