qt5: Disable X support

This commit is contained in:
Mikael 2024-08-24 17:47:19 +02:00
parent c4cf560275
commit 2e06c2dfec
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -6,6 +6,9 @@ let
inherit (nixpkgs.lib.lists) remove toList; inherit (nixpkgs.lib.lists) remove toList;
inherit (nixpkgs.lib.strings) mesonBool mesonEnable; inherit (nixpkgs.lib.strings) mesonBool mesonEnable;
inherit (self.lib) flags packages; inherit (self.lib) flags packages;
final' = final;
prev' = prev;
in genAttrs [ in genAttrs [
"SDL2" "SDL2"
"cairo" "cairo"
@ -89,6 +92,10 @@ in genAttrs [
++ [ (mesonBool "tests" false) ]; ++ [ (mesonBool "tests" false) ];
}); });
libsForQt5 = prev.libsForQt5.overrideScope (final: prev: {
inherit (final') qt5;
});
mesa = (prev.mesa.overrideAttrs (prevAttrs: { mesa = (prev.mesa.overrideAttrs (prevAttrs: {
mesonFlags = prevAttrs.mesonFlags or [ ] ++ [ mesonFlags = prevAttrs.mesonFlags or [ ] ++ [
(mesonEnable "xlib-lease" false) (mesonEnable "xlib-lease" false)
@ -109,6 +116,22 @@ in genAttrs [
mpv = final.mpv-unwrapped; mpv = final.mpv-unwrapped;
}; };
qt5 = prev.qt5.overrideScope (final: prev: {
qtbase = (prev.qtbase.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // {
NIX_CFLAGS_COMPILE = prevAttrs.env.NIX_CFLAGS_COMPILE or ""
|> flags.remove [ "-DUSE_X11" ];
};
configureFlags = prevAttrs.configureFlags or [ ]
|> flags.remove [ "-qpa xcb" ]
|> flags.subst { "-xcb" = "-no-xcb"; };
})).override {
withGtk3 = false;
withQttranslation = false;
};
});
w3m = prev.w3m.override { w3m = prev.w3m.override {
x11Support = false; x11Support = false;
imlib2 = final.imlib2; imlib2 = final.imlib2;