xvfb: promote to proper package

This can (and should!) be used by more than just xvfb-run.
This commit is contained in:
K900 2024-06-23 13:27:19 +03:00
parent 1cafa142d3
commit 43ebb05c57
3 changed files with 29 additions and 16 deletions

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 { };