uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
61
pkgs/applications/misc/crow-translate/default.nix
Normal file
61
pkgs/applications/misc/crow-translate/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, substituteAll
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, qttools
|
||||
, kwayland
|
||||
, leptonica
|
||||
, tesseract4
|
||||
, qtmultimedia
|
||||
, qtx11extras
|
||||
, qttranslations
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "crow-translate";
|
||||
version = "2.9.8";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/${pname}/${pname}/releases/download/${version}/${pname}-${version}-source.tar.gz";
|
||||
hash = "sha256-ZqiQVpKwGpglSc05Y1r6uScZyG4qnklPXqTGKxpS3f8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
qttools
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
kwayland
|
||||
leptonica
|
||||
tesseract4
|
||||
qtmultimedia
|
||||
qtx11extras
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/share/applications/io.crow_translate.CrowTranslate.desktop \
|
||||
--replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus"
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git i/src/settings/appsettings.cpp w/src/settings/appsettings.cpp
|
||||
index a73371b..b9d66ca 100644
|
||||
--- i/src/settings/appsettings.cpp
|
||||
+++ w/src/settings/appsettings.cpp
|
||||
@@ -75,7 +75,7 @@ void AppSettings::applyLocale(const QLocale &locale)
|
||||
const QLocale newLocale = locale == defaultLocale() ? QLocale::system() : locale;
|
||||
QLocale::setDefault(newLocale);
|
||||
s_appTranslator.load(newLocale, QStringLiteral(PROJECT_NAME), QStringLiteral("_"), QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("translations"), QStandardPaths::LocateDirectory));
|
||||
- s_qtTranslator.load(newLocale, QStringLiteral("qt"), QStringLiteral("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
+ s_qtTranslator.load(newLocale, QStringLiteral("qt"), QStringLiteral("_"), QLatin1String("@qttranslations@/translations"));
|
||||
}
|
||||
|
||||
QLocale AppSettings::defaultLocale()
|
||||
Loading…
Add table
Add a link
Reference in a new issue