mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
treewide: clean up all qttranslations workarounds
There are two kinds of changes here: - removing explicit qttranslations path hardcoding from applications that were patched to do it - replacing qttranslations in buildInputs with qttools for packages that really depend on the latter After this, qttranslation is never used outside Qt itself, as it should.
This commit is contained in:
parent
4d0a76416f
commit
6edd6f71c7
@ -3,11 +3,11 @@
|
||||
, fetchurl
|
||||
, cmake
|
||||
, pkg-config
|
||||
, qttools
|
||||
, wrapQtAppsHook
|
||||
, hicolor-icon-theme
|
||||
, openbabel
|
||||
, desktop-file-utils
|
||||
, qttranslations
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -37,12 +37,11 @@ mkDerivation rec {
|
||||
mv $out/lib/molsketch/* $out/lib
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||
nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
|
||||
buildInputs = [
|
||||
hicolor-icon-theme
|
||||
openbabel
|
||||
desktop-file-utils
|
||||
qttranslations
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -18,7 +18,6 @@
|
||||
, qtbase
|
||||
, qtsvg
|
||||
, qttools
|
||||
, qttranslations
|
||||
, qtwayland
|
||||
, rapidyaml
|
||||
, SDL2
|
||||
@ -83,7 +82,6 @@ llvmPackages_16.stdenv.mkDerivation rec {
|
||||
qtbase
|
||||
qtsvg
|
||||
qttools
|
||||
qttranslations
|
||||
qtwayland
|
||||
rapidyaml
|
||||
SDL2
|
||||
|
@ -14,8 +14,6 @@
|
||||
, qtlocation
|
||||
, qtsensors
|
||||
, qttools
|
||||
, qttranslations
|
||||
, substituteAll
|
||||
, zlib
|
||||
}:
|
||||
|
||||
@ -31,11 +29,6 @@ mkDerivation rec {
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/NixOS/nixpkgs/issues/86054
|
||||
(substituteAll {
|
||||
src = ./fix-qttranslations-path.diff;
|
||||
inherit qttranslations;
|
||||
})
|
||||
# https://github.com/OpenOrienteering/mapper/pull/1907
|
||||
(fetchpatch {
|
||||
url = "https://github.com/OpenOrienteering/mapper/commit/bc52aa567e90a58d6963b44d5ae1909f3f841508.patch";
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git i/src/util/translation_util.cpp w/src/util/translation_util.cpp
|
||||
index da03d216..c1f12751 100644
|
||||
--- i/src/util/translation_util.cpp
|
||||
+++ w/src/util/translation_util.cpp
|
||||
@@ -103,7 +103,7 @@ TranslationUtil::TranslationUtil(const QString& code, QString translation_file)
|
||||
}
|
||||
|
||||
QString translation_name = QLatin1String("qt_") + language.code;
|
||||
- if (!qt_translator.load(translation_name, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
+ if (!qt_translator.load(translation_name, QLatin1String("@qttranslations@/translations")))
|
||||
load(qt_translator, translation_name);
|
||||
|
||||
load(app_translator, translation_file);
|
@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, substituteAll, wrapQtAppsHook
|
||||
, qtscript, qttranslations, qtwebengine, gdal, proj, routino, quazip }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook
|
||||
, qtscript, qtwebengine, gdal, proj, routino, quazip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "qmapshack";
|
||||
@ -12,14 +12,6 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-qG/fiR2J5wQZaR+xvBGjdp3L7viqki2ktkzBUf6fZi8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
(substituteAll {
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ qtscript qtwebengine gdal proj routino quazip ];
|
||||
|
@ -1,74 +0,0 @@
|
||||
diff --git i/src/qmapshack/setup/CAppSetupLinux.cpp w/src/qmapshack/setup/CAppSetupLinux.cpp
|
||||
index 7581ef32..26eba3c8 100644
|
||||
--- i/src/qmapshack/setup/CAppSetupLinux.cpp
|
||||
+++ w/src/qmapshack/setup/CAppSetupLinux.cpp
|
||||
@@ -30,7 +30,7 @@ void CAppSetupLinux::initQMapShack() {
|
||||
prepareGdal("", "");
|
||||
|
||||
// setup translators
|
||||
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
|
||||
QString translationPath = QCoreApplication::applicationDirPath();
|
||||
translationPath.replace(QRegExp("bin$"), "share/qmapshack/translations");
|
||||
prepareTranslator(resourceDir, "qt_");
|
||||
diff --git i/src/qmapshack/setup/CAppSetupMac.cpp w/src/qmapshack/setup/CAppSetupMac.cpp
|
||||
index 37602802..ae4a5a23 100644
|
||||
--- i/src/qmapshack/setup/CAppSetupMac.cpp
|
||||
+++ w/src/qmapshack/setup/CAppSetupMac.cpp
|
||||
@@ -56,7 +56,7 @@ void CAppSetupMac::initQMapShack() {
|
||||
|
||||
// setup translators
|
||||
QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
|
||||
- prepareTranslator(translationPath, "qt_");
|
||||
+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
|
||||
prepareTranslator(translationPath, "qmapshack_");
|
||||
|
||||
// load and apply style sheet
|
||||
diff --git i/src/qmaptool/setup/CAppSetupLinux.cpp w/src/qmaptool/setup/CAppSetupLinux.cpp
|
||||
index b703e7bb..637d653e 100644
|
||||
--- i/src/qmaptool/setup/CAppSetupLinux.cpp
|
||||
+++ w/src/qmaptool/setup/CAppSetupLinux.cpp
|
||||
@@ -29,7 +29,7 @@ void CAppSetupLinux::initQMapTool() {
|
||||
prepareGdal("", "");
|
||||
|
||||
// setup translators
|
||||
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
|
||||
QString translationPath = QCoreApplication::applicationDirPath();
|
||||
translationPath.replace(QRegExp("bin$"), "share/qmaptool/translations");
|
||||
prepareTranslator(resourceDir, "qt_");
|
||||
diff --git i/src/qmaptool/setup/CAppSetupMac.cpp w/src/qmaptool/setup/CAppSetupMac.cpp
|
||||
index dd68b9c1..84351cf4 100644
|
||||
--- i/src/qmaptool/setup/CAppSetupMac.cpp
|
||||
+++ w/src/qmaptool/setup/CAppSetupMac.cpp
|
||||
@@ -57,7 +57,7 @@ void CAppSetupMac::initQMapTool() {
|
||||
|
||||
// setup translators
|
||||
QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
|
||||
- prepareTranslator(translationPath, "qt_");
|
||||
+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
|
||||
prepareTranslator(translationPath, "qmaptool_");
|
||||
|
||||
migrateDirContent(defaultCachePath());
|
||||
diff --git i/src/qmt_rgb2pct/main.cpp w/src/qmt_rgb2pct/main.cpp
|
||||
index 589d3d52..5f7c12f8 100644
|
||||
--- i/src/qmt_rgb2pct/main.cpp
|
||||
+++ w/src/qmt_rgb2pct/main.cpp
|
||||
@@ -47,7 +47,7 @@ static void prepareTranslator(QString translationPath, QString translationPrefix
|
||||
static void loadTranslations() {
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || \
|
||||
defined(Q_OS_CYGWIN)
|
||||
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
|
||||
QString translationPath = QCoreApplication::applicationDirPath();
|
||||
translationPath.replace(QRegExp("bin$"), "share/" APP_STR "/translations");
|
||||
prepareTranslator(resourceDir, "qt_");
|
||||
@@ -58,7 +58,7 @@ static void loadTranslations() {
|
||||
// os x
|
||||
static QString relTranslationDir = "Resources/translations"; // app
|
||||
QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
|
||||
- prepareTranslator(translationPath, "qt_");
|
||||
+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
|
||||
prepareTranslator(translationPath, APP_STR "_");
|
||||
#endif
|
||||
|
@ -7,7 +7,6 @@
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtx11extras
|
||||
, qttranslations
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -21,21 +20,11 @@ mkDerivation rec {
|
||||
sha256 = "1469ng6zk0qx0qfsihrnlz1j9i1wk0hx4vqdaplz9mdpyxvmlryk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
./fix-qttranslations-path.diff
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
qtbase qttools qtx11extras
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/birdtrayapp.cpp \
|
||||
--subst-var-by qttranslations ${qttranslations}
|
||||
'';
|
||||
|
||||
# Wayland support is broken.
|
||||
# https://github.com/gyunaev/birdtray/issues/113#issuecomment-621742315
|
||||
qtWrapperArgs = [ "--set QT_QPA_PLATFORM xcb" ];
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/src/birdtrayapp.cpp b/src/birdtrayapp.cpp
|
||||
index 847b4d3..3a3709a 100644
|
||||
--- a/src/birdtrayapp.cpp
|
||||
+++ b/src/birdtrayapp.cpp
|
||||
@@ -130,7 +130,7 @@ bool BirdtrayApp::loadTranslations() {
|
||||
[](QString path) { return path.append("/translations"); });
|
||||
QLocale locale = QLocale::system();
|
||||
bool success = loadTranslation(
|
||||
- qtTranslator, locale, "qt", {QLibraryInfo::location(QLibraryInfo::TranslationsPath)});
|
||||
+ qtTranslator, locale, "qt", {QLatin1String("@qttranslations@/translations")});
|
||||
success &= loadTranslation(dynamicTranslator, locale, "dynamic", locations);
|
||||
success &= loadTranslation(mainTranslator, locale, "main", locations);
|
||||
return success;
|
@ -1,7 +1,6 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, substituteAll
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, qttools
|
||||
@ -10,7 +9,6 @@
|
||||
, tesseract4
|
||||
, qtmultimedia
|
||||
, qtx11extras
|
||||
, qttranslations
|
||||
, wrapQtAppsHook
|
||||
, gst_all_1
|
||||
, testers
|
||||
@ -26,14 +24,6 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-PvfruCqmTBFLWLeIL9NV6+H2AifXcY97ImHzD1zEs28=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace data/io.crow_translate.CrowTranslate.desktop \
|
||||
--replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus"
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git i/src/settings/appsettings.cpp w/src/settings/appsettings.cpp
|
||||
index 32cabfb..aab92ea 100644
|
||||
--- i/src/settings/appsettings.cpp
|
||||
+++ w/src/settings/appsettings.cpp
|
||||
@@ -79,7 +79,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, i18nDir, 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()
|
@ -1,6 +1,6 @@
|
||||
{ lib, mkDerivation, fetchFromGitHub
|
||||
, cmake, gcc-arm-embedded, python3Packages
|
||||
, qtbase, qtmultimedia, qttranslations, SDL, gtest
|
||||
, qtbase, qtmultimedia, qttools, SDL, gtest
|
||||
, dfu-util
|
||||
}:
|
||||
|
||||
@ -16,9 +16,9 @@ mkDerivation rec {
|
||||
sha256 = "sha256-bKMAyONy1Udd+2nDVEMrtIsnfqrNuBVMWU7nCqvZ+3E=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ];
|
||||
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow qttools ];
|
||||
|
||||
buildInputs = [ qtbase qtmultimedia qttranslations SDL ];
|
||||
buildInputs = [ qtbase qtmultimedia SDL ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i companion/src/burnconfigdialog.cpp \
|
||||
@ -27,7 +27,6 @@ mkDerivation rec {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGTEST_ROOT=${gtest.src}/googletest"
|
||||
"-DQT_TRANSLATIONS_DIR=${qttranslations}/translations"
|
||||
"-DDFU_UTIL_PATH=${dfu-util}/bin/dfu-util"
|
||||
# file RPATH_CHANGE could not write new RPATH
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchurl, pkg-config, which
|
||||
, qtbase, qmake, qttools, qttranslations, wrapQtAppsHook
|
||||
, qmake, qttools, wrapQtAppsHook
|
||||
, libusb1, shapelib, zlib
|
||||
, withGUI ? false, qtserialport
|
||||
, withMapPreview ? (!stdenv.isDarwin), qtwebengine
|
||||
@ -21,11 +21,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs testo
|
||||
'' + lib.optionalString withGUI ''
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
substituteInPlace gui/mainwindow.cc \
|
||||
--replace 'QLibraryInfo::location(QLibraryInfo::TranslationsPath)' \
|
||||
'QLatin1String("${qttranslations}/translations")'
|
||||
'' + lib.optionalString withDoc ''
|
||||
substituteInPlace gbversion.h.qmake.in \
|
||||
--replace /usr/share/doc $doc/share/doc
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, mkDerivation, lib, fetchFromGitHub, substituteAll
|
||||
, qmake, qttools, qttranslations
|
||||
{ stdenv, mkDerivation, lib, fetchFromGitHub
|
||||
, qmake, qttools
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -13,12 +13,6 @@ mkDerivation rec {
|
||||
sha256 = "080vnwcciqblfrbfyz9gjhl2lqw1hkdpbgr5qfrlyglkd4ynjd84";
|
||||
};
|
||||
|
||||
patches = (substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
});
|
||||
|
||||
nativeBuildInputs = [ qmake qttools ];
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -1,17 +0,0 @@
|
||||
diff --git i/GPXLab/main.cpp w/GPXLab/main.cpp
|
||||
index b12d2dd..58d37c5 100644
|
||||
--- i/GPXLab/main.cpp
|
||||
+++ w/GPXLab/main.cpp
|
||||
@@ -19,10 +19,10 @@ int main(int argc, char *argv[])
|
||||
app.installTranslator(&gpxlab);
|
||||
|
||||
QTranslator qt;
|
||||
-#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_WIN32)
|
||||
qt.load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR);
|
||||
#else
|
||||
- qt.load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
+ qt.load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations"));
|
||||
#endif
|
||||
app.installTranslator(&qt);
|
||||
|
@ -3,10 +3,8 @@
|
||||
, fetchFromGitHub
|
||||
, qmake
|
||||
, nix-update-script
|
||||
, substituteAll
|
||||
, qtbase
|
||||
, qttools
|
||||
, qttranslations
|
||||
, qtlocation ? null # qt5 only
|
||||
, qtpositioning ? null # qt6 only
|
||||
, qtpbfimageplugin
|
||||
@ -31,12 +29,6 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-Zf2eyDx5QK69W6HNz/IGGHkX2qCDnxYsU8KLCgU9teY=";
|
||||
};
|
||||
|
||||
patches = (substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.diff;
|
||||
inherit qttranslations;
|
||||
});
|
||||
|
||||
buildInputs = [ qtpbfimageplugin qtserialport ]
|
||||
++ (if isQt6 then [
|
||||
qtbase
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff --git i/src/GUI/app.cpp w/src/GUI/app.cpp
|
||||
index 37e9d3f..d4a065c 100644
|
||||
--- i/src/GUI/app.cpp
|
||||
+++ w/src/GUI/app.cpp
|
||||
@@ -35,11 +35,10 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
installTranslator(gpxsee);
|
||||
|
||||
QTranslator *qt = new QTranslator(this);
|
||||
-#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_WIN32)
|
||||
if (qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir()))
|
||||
#else // Q_OS_WIN32 || Q_OS_MAC
|
||||
- if (qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||
- QLibraryInfo::TranslationsPath)))
|
||||
+ if (qt->load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations")))
|
||||
#endif // Q_OS_WIN32 || Q_OS_MAC
|
||||
installTranslator(qt);
|
||||
|
@ -5,7 +5,6 @@
|
||||
, qmake
|
||||
, qttools
|
||||
, wrapQtAppsHook
|
||||
, qttranslations
|
||||
, gdal
|
||||
, proj
|
||||
, qtsvg
|
||||
@ -48,7 +47,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"TRANSDIR_SYSTEM=${qttranslations}/translations"
|
||||
"USEWEBENGINE=1"
|
||||
] ++ lib.optional withGeoimage "GEOIMAGE=1"
|
||||
++ lib.optional withGpsdlib "GPSDLIB=1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib, mkDerivation, fetchFromGitHub
|
||||
, cmake, gcc-arm-embedded, python3Packages
|
||||
, qtbase, qtmultimedia, qttranslations, SDL, gtest
|
||||
, qtbase, qtmultimedia, qttools, SDL, gtest
|
||||
, dfu-util, avrdude
|
||||
}:
|
||||
|
||||
@ -15,9 +15,9 @@ mkDerivation rec {
|
||||
sha256 = "sha256-F3zykJhKuIpLQSTjn7mcdjEmgRAlwCZpkTaKQR9ve3g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ];
|
||||
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow qttools ];
|
||||
|
||||
buildInputs = [ qtbase qtmultimedia qttranslations SDL ];
|
||||
buildInputs = [ qtbase qtmultimedia SDL ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i companion/src/burnconfigdialog.cpp \
|
||||
@ -27,7 +27,6 @@ mkDerivation rec {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGTEST_ROOT=${gtest.src}/googletest"
|
||||
"-DQT_TRANSLATIONS_DIR=${qttranslations}/translations"
|
||||
# XXX I would prefer to include these here, though we will need to file a bug upstream to get that changed.
|
||||
#"-DDFU_UTIL_PATH=${dfu-util}/bin/dfu-util"
|
||||
#"-DAVRDUDE_PATH=${avrdude}/bin/avrdude"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, lib, fetchFromGitea, qmake, qttools, qtbase, qtserialport
|
||||
, qtconnectivity, qtcharts, qttranslations, wrapQtAppsHook }:
|
||||
, qtconnectivity, qtcharts, wrapQtAppsHook }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ubpm";
|
||||
@ -15,7 +15,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace sources/mainapp/mainapp.pro \
|
||||
--replace '$$[QT_INSTALL_TRANSLATIONS]' '${qttranslations}/translations' \
|
||||
--replace 'INSTALLDIR = /tmp/ubpm.AppDir' "INSTALLDIR = $out" \
|
||||
--replace '/usr/bin' '/bin' \
|
||||
--replace 'INSTALLS += target translations themes devices help lin' 'INSTALLS += target translations themes devices help'
|
||||
@ -40,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# *.so plugins are being wrapped automatically which breaks them
|
||||
dontWrapQtApps = true;
|
||||
|
||||
buildInputs = [ qtbase qtserialport qtconnectivity qtcharts qttranslations ];
|
||||
buildInputs = [ qtbase qtserialport qtconnectivity qtcharts ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://codeberg.org/LazyT/ubpm";
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, fetchFromGitLab, substituteAll, installShellFiles
|
||||
{ lib, stdenv, fetchFromGitLab, installShellFiles
|
||||
, qmake, qttools
|
||||
, qtsvg, qttranslations, qtxmlpatterns
|
||||
, qtsvg, qtxmlpatterns
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
@ -15,12 +15,6 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-N9fC2tCP4TVNncatHaz5W5Mp3jOmAcEWYCl30+0myaE=";
|
||||
};
|
||||
|
||||
patches = (substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
});
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/app/translations.pri \
|
||||
--replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${lib.getDev qttools}/bin/lrelease'
|
||||
|
@ -1,37 +0,0 @@
|
||||
diff --git i/src/libs/vmisc/vabstractapplication.cpp w/src/libs/vmisc/vabstractapplication.cpp
|
||||
index b64817bab..5f9aa3518 100644
|
||||
--- i/src/libs/vmisc/vabstractapplication.cpp
|
||||
+++ w/src/libs/vmisc/vabstractapplication.cpp
|
||||
@@ -221,26 +221,26 @@ void VAbstractApplication::LoadTranslation(const QString &locale)
|
||||
ClearTranslation();
|
||||
|
||||
qtTranslator = new QTranslator(this);
|
||||
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_WIN)
|
||||
qtTranslator->load("qt_" + locale, translationsPath(locale));
|
||||
#else
|
||||
- qtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
+ qtTranslator->load("qt_" + locale, QLatin1String("@qttranslations@/translations"));
|
||||
#endif
|
||||
installTranslator(qtTranslator);
|
||||
|
||||
qtxmlTranslator = new QTranslator(this);
|
||||
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_WIN)
|
||||
qtxmlTranslator->load("qtxmlpatterns_" + locale, translationsPath(locale));
|
||||
#else
|
||||
- qtxmlTranslator->load("qtxmlpatterns_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
+ qtxmlTranslator->load("qtxmlpatterns_" + locale, QLatin1String("@qttranslations@/translations"));
|
||||
#endif
|
||||
installTranslator(qtxmlTranslator);
|
||||
|
||||
qtBaseTranslator = new QTranslator(this);
|
||||
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_WIN)
|
||||
qtBaseTranslator->load("qtbase_" + locale, translationsPath(locale));
|
||||
#else
|
||||
- qtBaseTranslator->load("qtbase_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
+ qtBaseTranslator->load("qtbase_" + locale, QLatin1String("@qttranslations@/translations"));
|
||||
#endif
|
||||
installTranslator(qtBaseTranslator);
|
||||
|
@ -12,7 +12,7 @@
|
||||
, mkDerivation
|
||||
, qtgraphicaleffects
|
||||
, qtquickcontrols2
|
||||
, qttranslations
|
||||
, qttools
|
||||
}:
|
||||
|
||||
# How to update Linphone? (The Qt desktop app)
|
||||
@ -73,11 +73,11 @@ mkDerivation rec {
|
||||
minizip-ng
|
||||
qtgraphicaleffects
|
||||
qtquickcontrols2
|
||||
qttranslations
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qttools
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -12,7 +12,6 @@
|
||||
, qtbase
|
||||
, qtsvg
|
||||
, qttools
|
||||
, qttranslations
|
||||
, ffmpeg
|
||||
, filter-audio
|
||||
, libexif
|
||||
@ -44,7 +43,6 @@ mkDerivation rec {
|
||||
libXScrnSaver
|
||||
qtbase
|
||||
qtsvg
|
||||
qttranslations
|
||||
ffmpeg
|
||||
filter-audio
|
||||
libexif
|
||||
|
@ -16,8 +16,6 @@
|
||||
, qtkeychain
|
||||
, qttools
|
||||
, qtwebkit
|
||||
, qttranslations
|
||||
, substituteAll
|
||||
, withI18n ? false
|
||||
}:
|
||||
|
||||
@ -39,12 +37,6 @@ in mkDerivation rec {
|
||||
sha256 = "sha256-15G9YjT3qBKbeOKfb/IgXOO+DaJaTULP9NJn/MFYZS8=";
|
||||
};
|
||||
|
||||
patches = (substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
});
|
||||
|
||||
buildInputs = [
|
||||
akonadi-contacts
|
||||
gpgme
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git i/src/Gui/main.cpp w/src/Gui/main.cpp
|
||||
index 851db4f1..e997f46e 100644
|
||||
--- i/src/Gui/main.cpp
|
||||
+++ w/src/Gui/main.cpp
|
||||
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
|
||||
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load(QLatin1String("qt_") + QLocale::system().name(),
|
||||
- QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
+ QLatin1String("@qttranslations@/translations"));
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
||||
QLatin1String localeSuffix("/locale");
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, qtsvg, qtwebengine, qttranslations, wrapQtAppsHook }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, qtsvg, qtwebengine, wrapQtAppsHook, qttools }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pageedit";
|
||||
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-naoflFANeMwabbdrNL3+ndvEXYT4Yqf+Mo77HcCexHE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake qttranslations wrapQtAppsHook ];
|
||||
nativeBuildInputs = [ cmake wrapQtAppsHook qttools ];
|
||||
propagatedBuildInputs = [ qtsvg qtwebengine ];
|
||||
cmakeFlags = [ "-DINSTALL_BUNDLED_DICTS=0" ];
|
||||
|
||||
|
@ -11,13 +11,13 @@
|
||||
, qtpositioning
|
||||
, qtmultimedia
|
||||
, qtserialport
|
||||
, qttranslations
|
||||
, qtwayland
|
||||
, qtwebengine
|
||||
, calcmysky
|
||||
, qxlsx
|
||||
, indilib
|
||||
, libnova
|
||||
, qttools
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
|
||||
perl
|
||||
wrapGAppsHook
|
||||
wrapQtAppsHook
|
||||
qttools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -60,7 +61,6 @@ stdenv.mkDerivation rec {
|
||||
qtpositioning
|
||||
qtmultimedia
|
||||
qtserialport
|
||||
qttranslations
|
||||
qtwebengine
|
||||
calcmysky
|
||||
qxlsx
|
||||
|
@ -4,12 +4,12 @@
|
||||
, fetchpatch
|
||||
, extra-cmake-modules
|
||||
, qtbase
|
||||
, qttranslations
|
||||
, kcoreaddons
|
||||
, python3
|
||||
, sqlite
|
||||
, postgresql
|
||||
, libmysqlclient
|
||||
, qttools
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -34,9 +34,9 @@ mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
nativeBuildInputs = [ extra-cmake-modules qttools ];
|
||||
|
||||
buildInputs = [ qttranslations kcoreaddons python3 sqlite postgresql libmysqlclient ];
|
||||
buildInputs = [ kcoreaddons python3 sqlite postgresql libmysqlclient ];
|
||||
|
||||
propagatedBuildInputs = [ qtbase ];
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
{ mkDerivation, extra-cmake-modules, qtbase, qtquickcontrols2, qttranslations, qtgraphicaleffects }:
|
||||
{ mkDerivation, extra-cmake-modules, qtbase, qtquickcontrols2, qtgraphicaleffects, qttools }:
|
||||
|
||||
mkDerivation {
|
||||
pname = "kirigami2";
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
buildInputs = [ qtbase qtquickcontrols2 qttranslations qtgraphicaleffects ];
|
||||
nativeBuildInputs = [ extra-cmake-modules qttools ];
|
||||
buildInputs = [ qtbase qtquickcontrols2 qtgraphicaleffects ];
|
||||
outputs = [ "out" "dev" ];
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtmultimedia
|
||||
, qttranslations
|
||||
, qttools
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
@ -41,6 +41,6 @@ mkDerivation {
|
||||
postPatch = ''
|
||||
sed -i 's|@out@|'"''${out}"'|g' src/src.pro src/defines.h
|
||||
'';
|
||||
nativeBuildInputs = [ qmake ];
|
||||
buildInputs = [ qtbase qtmultimedia qttranslations ];
|
||||
nativeBuildInputs = [ qmake qttools ];
|
||||
buildInputs = [ qtbase qtmultimedia ];
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
, kimageannotator
|
||||
, wrapQtAppsHook
|
||||
, qtsvg
|
||||
, qttranslations
|
||||
, qttools
|
||||
, qtx11extras
|
||||
}:
|
||||
|
||||
@ -26,13 +26,13 @@ stdenv.mkDerivation rec {
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
wrapQtAppsHook
|
||||
qttools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
kcolorpicker
|
||||
kimageannotator
|
||||
qtsvg
|
||||
qttranslations
|
||||
qtx11extras
|
||||
];
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, qttranslations
|
||||
, wrapQtAppsHook
|
||||
, libnitrokey
|
||||
, cppcodec
|
||||
, qttools
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
cmake
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
qttranslations
|
||||
qttools
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -10,8 +10,8 @@
|
||||
, openssl
|
||||
, pcsclite
|
||||
, qtbase
|
||||
, qttranslations
|
||||
, qtsvg
|
||||
, qttools
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -29,7 +29,7 @@ mkDerivation rec {
|
||||
sha256 = "1cikz36w9phgczcqnwk4k3mx3kk919wy2327jksmfa4cjfjq4a8d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gettext pkg-config ];
|
||||
nativeBuildInputs = [ cmake gettext pkg-config qttools ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace client/CMakeLists.txt \
|
||||
@ -44,7 +44,6 @@ mkDerivation rec {
|
||||
pcsclite
|
||||
qtbase
|
||||
qtsvg
|
||||
qttranslations
|
||||
];
|
||||
|
||||
# qdigidoc4's `QPKCS11::reload()` dlopen()s "opensc-pkcs11.so" in QLibrary,
|
||||
|
@ -5,7 +5,7 @@
|
||||
, gtest
|
||||
, pcsclite
|
||||
, pkg-config
|
||||
, qttranslations
|
||||
, qttools
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -23,12 +23,12 @@ mkDerivation rec {
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
qttools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtest # required during build of lib/libelectronic-id/lib/libpcsc-cpp
|
||||
pcsclite
|
||||
qttranslations
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user