Merge pull request #321942 from K900/more-xvfb

treewide: remove Mesa from more closures by replacing full xorgserver with xvfb
This commit is contained in:
K900 2024-06-23 15:12:07 +03:00 committed by GitHub
commit e9e2bf4f4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 43 additions and 32 deletions

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, cmake, pkg-config, python3, libX11, libXext, libXinerama, libXrandr, libXft, libXrender, libXdmcp, libXfixes, freetype, asciidoc
, xdotool, xorgserver, xsetroot, xterm, runtimeShell
, xdotool, xorg, xsetroot, xterm, runtimeShell
, fetchpatch
, nixosTests }:
@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
nativeCheckInputs = [
(python3.withPackages (ps: with ps; [ ewmh pytest xlib ]))
xdotool
xorgserver
xorg.xvfb
xsetroot
xterm
python3.pkgs.pytestCheckHook

View File

@ -1,7 +1,7 @@
{ fetchurl, lib, stdenv, pkg-config, makeWrapper, meson, ninja, installShellFiles, libxcb, xcbutilkeysyms
, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification, libX11, pcre2, libev
, yajl, xcb-util-cursor, perl, pango, perlPackages, libxkbcommon
, xorgserver, xvfb-run
, xvfb-run
, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, findXMLCatalogs
}:
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
libstartup_notification libX11 pcre2 libev yajl xcb-util-cursor perl pango
perlPackages.AnyEventI3 perlPackages.X11XCB perlPackages.IPCRun
perlPackages.ExtUtilsPkgConfig perlPackages.InlineC
xorgserver xvfb-run
xvfb-run
];
configureFlags = [ "--disable-builddir" ];

View File

@ -75,7 +75,7 @@ ps.buildPythonApplication rec {
ps.toml
] ++ lib.optionals stdenv.isLinux [
ps.pytest-xvfb
xorg.xorgserver
xorg.xvfb
];
preCheck = ''

View File

@ -13,7 +13,7 @@
, libX11
# To enable the "interactive-wayland" subcommand of xkbcli. This is the
# wayland equivalent of `xev` on X11.
, xorgserver # for Xvfb in tests
, xorg
, withWaylandTools ? stdenv.isLinux
, wayland
, wayland-protocols
@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
outputs = [ "out" "dev" "doc" ];
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ meson ninja pkg-config bison doxygen xorgserver ]
nativeBuildInputs = [ meson ninja pkg-config bison doxygen xorg.xvfb ]
++ lib.optional withWaylandTools wayland-scanner;
buildInputs = [ xkeyboard_config libxcb libxml2 ]
++ lib.optionals withWaylandTools [ wayland wayland-protocols ];

View File

@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
xorgserver,
xorg,
pytest,
pytest-xvfb,
i3,
@ -31,7 +31,7 @@ buildPythonPackage rec {
pytest
xdpyinfo
pytest-xvfb
xorgserver
xorg.xvfb
i3
];

View File

@ -32,7 +32,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytestCheckHook
xorg.xeyes
xorg.xorgserver
xorg.xvfb
];
preCheck = ''

View File

@ -39,7 +39,7 @@ buildPythonPackage rec {
nose
util-linux
xorg.xauth
xorg.xorgserver
xorg.xvfb
];
disabledTestPaths = [

View File

@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchPypi,
xorgserver,
xorg,
mock,
}:
@ -15,7 +15,7 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "097wxhvp01ikqpg1z3v8rqhss6f1vwr399zpz9a05d2135bsxx5w";
};
propagatedBuildInputs = [ xorgserver ];
propagatedBuildInputs = [ xorg.xvfb ];
# See: https://github.com/cgoldberg/xvfbwrapper/issues/30
doCheck = false;

View File

@ -905,6 +905,33 @@ self: super:
};
}));
# xvfb is used by a bunch of things to run tests
# and doesn't support hardware accelerated rendering
# so remove it from the rebuild heavy path for mesa
xvfb = super.xorgserver.overrideAttrs(old: {
configureFlags = [
"--enable-xvfb"
"--disable-xorg"
"--disable-xquartz"
"--disable-xwayland"
"--disable-glamor"
"--disable-glx"
"--disable-dri"
"--disable-dri2"
"--disable-dri3"
"--with-xkb-bin-directory=${xorg.xkbcomp}/bin"
"--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb"
"--with-xkb-output=$out/share/X11/xkb/compiled"
];
buildInputs = old.buildInputs ++ (with xorg; [
pixman
libXfont2
xtrans
libxcvt
]);
});
lndir = super.lndir.overrideAttrs (attrs: {
buildInputs = [];
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];

View File

@ -2,7 +2,7 @@
, stdenvNoCC
, fetchFromGitHub
, makeWrapper
, xorgserver
, xorg
, getopt
, xauth
, util-linux
@ -39,7 +39,7 @@ stdenvNoCC.mkDerivation rec {
patchShebangs $out/bin/xvfb-run
wrapProgram $out/bin/xvfb-run \
--set-default FONTCONFIG_FILE "${fontsConf}" \
--prefix PATH : ${lib.makeBinPath [ getopt xorgserver xauth which util-linux gawk coreutils ]}
--prefix PATH : ${lib.makeBinPath [ getopt xorg.xvfb xauth which util-linux gawk coreutils ]}
'';
doInstallCheck = true;

View File

@ -14659,20 +14659,6 @@ with pkgs;
xvfb-run = callPackage ../tools/misc/xvfb-run {
inherit (texFunctions) fontsConf;
# xvfb-run is used by a bunch of things to run tests
# and doesn't support hardware accelerated rendering
# so remove it from the rebuild heavy path for mesa
xorgserver = xorg.xorgserver.overrideAttrs(old: {
buildInputs = lib.filter (pkg: lib.getName pkg != "mesa") old.buildInputs;
configureFlags = old.configureFlags ++ [
"--disable-glamor"
"--disable-glx"
"--disable-dri"
"--disable-dri2"
"--disable-dri3"
];
});
};
xvkbd = callPackage ../tools/X11/xvkbd { };

View File

@ -17285,9 +17285,7 @@ self: super: with self; {
xtensor-python = callPackage ../development/python-modules/xtensor-python { };
xvfbwrapper = callPackage ../development/python-modules/xvfbwrapper {
inherit (pkgs.xorg) xorgserver;
};
xvfbwrapper = callPackage ../development/python-modules/xvfbwrapper {};
xxhash = callPackage ../development/python-modules/xxhash { };