nixpkgs/pkgs/applications/misc/crow-translate/default.nix

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

69 lines
1.4 KiB
Nix
Raw Normal View History

2021-01-15 05:42:41 +00:00
{ lib
2022-05-10 23:10:13 +00:00
, stdenv
2022-05-19 13:33:25 +00:00
, fetchzip
2020-11-29 22:17:24 +00:00
, cmake
, extra-cmake-modules
, qttools
2022-05-19 13:33:25 +00:00
, kwayland
2020-11-29 22:17:24 +00:00
, leptonica
, tesseract4
, qtmultimedia
, qtx11extras
2022-05-10 23:10:13 +00:00
, wrapQtAppsHook
2022-09-05 17:29:13 +00:00
, gst_all_1
, testers
, crow-translate
2020-11-29 22:17:24 +00:00
}:
2022-05-10 23:10:13 +00:00
stdenv.mkDerivation rec {
2020-11-29 22:17:24 +00:00
pname = "crow-translate";
2024-01-05 05:11:19 +00:00
version = "2.11.1";
2020-11-29 22:17:24 +00:00
2022-05-19 13:33:25 +00:00
src = fetchzip {
url = "https://github.com/${pname}/${pname}/releases/download/${version}/${pname}-${version}-source.tar.gz";
2024-01-05 05:11:19 +00:00
hash = "sha256-1rq1pF4tOaZNEaHflxlBuHta80EzD9m3O99geR1EPxE=";
2020-11-29 22:17:24 +00:00
};
2022-09-05 17:29:13 +00:00
postPatch = ''
substituteInPlace data/io.crow_translate.CrowTranslate.desktop \
--replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus"
'';
2022-05-19 13:33:25 +00:00
nativeBuildInputs = [
cmake
extra-cmake-modules
qttools
wrapQtAppsHook
];
2020-11-29 22:17:24 +00:00
2022-05-19 13:33:25 +00:00
buildInputs = [
kwayland
leptonica
tesseract4
qtmultimedia
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 {
package = crow-translate;
};
2021-01-15 05:42:41 +00:00
meta = with lib; {
2020-11-29 22:17:24 +00:00
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;
2022-09-05 17:29:13 +00:00
mainProgram = "crow";
2020-11-29 22:17:24 +00:00
};
}