From 2e06c2dfec4ab5e455b6685150a5785725f7e258 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Sat, 24 Aug 2024 17:47:19 +0200 Subject: [PATCH] qt5: Disable X support --- overlay/no-x.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/overlay/no-x.nix b/overlay/no-x.nix index 1bfa2eb..7582a85 100644 --- a/overlay/no-x.nix +++ b/overlay/no-x.nix @@ -6,6 +6,9 @@ let inherit (nixpkgs.lib.lists) remove toList; inherit (nixpkgs.lib.strings) mesonBool mesonEnable; inherit (self.lib) flags packages; + + final' = final; + prev' = prev; in genAttrs [ "SDL2" "cairo" @@ -87,6 +90,10 @@ in genAttrs [ libgnomekbd = prev.libgnomekbd.overrideAttrs (prevAttrs: { mesonFlags = prevAttrs.mesonFlags or [ ] ++ [ (mesonBool "tests" false) ]; + }); + + libsForQt5 = prev.libsForQt5.overrideScope (final: prev: { + inherit (final') qt5; }); mesa = (prev.mesa.overrideAttrs (prevAttrs: { @@ -109,6 +116,22 @@ in genAttrs [ 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 { x11Support = false; imlib2 = final.imlib2;