From 6d6cd8d048a40423d41058b01547db638f5230e8 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Mon, 16 Feb 2026 16:57:30 +0100 Subject: [PATCH 1/2] xvfb: convert build to meson disable secure-rpc and udev in order to get rid of libtirpc and udev deps Co-authored-by: Zitrone <74491719+quantenzitrone@users.noreply.github.com> --- pkgs/by-name/xv/xvfb/package.nix | 40 ++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/xv/xvfb/package.nix b/pkgs/by-name/xv/xvfb/package.nix index df80cfbc9126..cb077ebbf382 100644 --- a/pkgs/by-name/xv/xvfb/package.nix +++ b/pkgs/by-name/xv/xvfb/package.nix @@ -3,6 +3,8 @@ { lib, stdenv, + meson, + ninja, pkg-config, xorg-server, dri-pkgconfig-stub, @@ -29,6 +31,7 @@ xkeyboard-config, xorgproto, xtrans, + font-util, }: stdenv.mkDerivation (finalAttrs: { pname = "xvfb"; @@ -37,10 +40,15 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; buildInputs = [ dri-pkgconfig-stub + font-util libdrm libGL libx11 @@ -64,16 +72,28 @@ stdenv.mkDerivation (finalAttrs: { xtrans ]; - configureFlags = [ - "--enable-xvfb" - "--disable-xorg" - "--disable-xquartz" - "--disable-xwayland" - "--with-xkb-bin-directory=${xkbcomp}/bin" - "--with-xkb-path=${xkeyboard-config}/share/X11/xkb" - "--with-xkb-output=$out/share/X11/xkb/compiled" + mesonFlags = [ + "-Dxvfb=true" + "-Dxephyr=false" + "-Dxorg=false" + "-Dxnest=false" + "-Dsecure-rpc=false" + "-Dudev=false" + "-Dudev_kms=false" + + "-Dlog_dir=/var/log" + "-Ddefault_font_path=" + + "-Dxkb_bin_dir=${xkbcomp}/bin" + "-Dxkb_dir=${xkeyboard-config}/share/X11/xkb" + "-Dxkb_output_dir=$out/share/X11/xkb/compiled" ] - ++ lib.optional stdenv.hostPlatform.isDarwin "--without-dtrace"; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ + "-Dxcsecurity=true" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "-Ddtrace=false" + ]; meta = { description = "X virtual framebuffer"; From 61e2b545a069e0646282413e2cc6f99a496365a0 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Tue, 10 Mar 2026 23:58:32 +0100 Subject: [PATCH 2/2] xvfb: fix Darwin build Co-authored-by: Zitrone <74491719+quantenzitrone@users.noreply.github.com> --- pkgs/by-name/xv/xvfb/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/xv/xvfb/package.nix b/pkgs/by-name/xv/xvfb/package.nix index cb077ebbf382..d5e64c146571 100644 --- a/pkgs/by-name/xv/xvfb/package.nix +++ b/pkgs/by-name/xv/xvfb/package.nix @@ -20,6 +20,7 @@ libxkbfile, libxshmfence, mesa-gl-headers, + mesa, openssl, pixman, libxcb-util, @@ -47,9 +48,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - dri-pkgconfig-stub font-util - libdrm libGL libx11 libxau @@ -70,6 +69,13 @@ stdenv.mkDerivation (finalAttrs: { libxcb-wm xorgproto xtrans + ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ + dri-pkgconfig-stub + libdrm + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + mesa ]; mesonFlags = [