summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2023-12-25 23:31:25 +0300
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-01-05 17:49:54 +0000
commitc88bf378775cabadcf272127d47cace873b69faf (patch)
treee113c13c6400eb14e311b64910c8a749333afce3
parentpipewire: fix build without x11 support (diff)
downloadnixpkgs-origin/backport-258812-to-release-23.11.tar.gz
nixos/no-x-libs: build qtbase without qt translationorigin/backport-258812-to-release-23.11
(cherry picked from commit 2e14d8ba72b07047d1dda0ed8161956fba34ee0a)
-rw-r--r--nixos/modules/config/no-x-libs.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix5
2 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix
index b2eb46f273b1..a3eba86007aa 100644
--- a/nixos/modules/config/no-x-libs.nix
+++ b/nixos/modules/config/no-x-libs.nix
@@ -71,7 +71,7 @@ with lib;
qemu = super.qemu.override { gtkSupport = false; spiceSupport = false; sdlSupport = false; };
qrencode = super.qrencode.overrideAttrs (_: { doCheck = false; });
qt5 = super.qt5.overrideScope (const (super': {
- qtbase = super'.qtbase.override { withGtk3 = false; };
+ qtbase = super'.qtbase.override { withGtk3 = false; withQttranslation = false; };
}));
stoken = super.stoken.override { withGTK3 = false; };
# translateManpages -> perlPackages.po4a -> texlive-combined-basic -> texlive-core-big -> libX11
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 67e9bd5440d1..594489a0d750 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -15,7 +15,7 @@
# optional dependencies
, cups ? null, postgresql ? null
, withGtk3 ? false, dconf, gtk3
-, qttranslations ? null
+, withQttranslation ? true, qttranslations ? null
# options
, libGLSupported ? !stdenv.isDarwin
@@ -351,7 +351,8 @@ stdenv.mkDerivation (finalAttrs: ({
] ++ lib.optionals (mysqlSupport) [
"-L" "${libmysqlclient}/lib"
"-I" "${libmysqlclient}/include"
- ] ++ lib.optional (qttranslations != null) [
+ ] ++ lib.optional (withQttranslation && (qttranslations != null)) [
+ # depends on x11
"-translationdir" "${qttranslations}/translations"
]
);