From bd06ff7cf1cc73e047e5a3a64af062cd6e9174e6 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Sat, 20 Dec 2025 12:57:48 +0300 Subject: [PATCH] perlPackages.X11XCB: fix runtime errors - add patch reverting upstream commit that added XComposite support: https://github.com/zhmylove/X11-XCB/commit/b78e33f7cdf8141b085a4f8773adda6c4a4870c3 Fixes build failure of `i3` that uses X11XCB in tests: ``` Running phase: checkPhase Can't load '/nix/store/...-perl5.42.0-X11-XCB-0.24/lib/perl5/site_perl/5.42.0/x86_64-linux-thread-multi/auto/X11/XCB/XCB.so' for module X11::XCB: /nix/store/...-perl5.42.0-X11-XCB-0.24/lib/perl5/site_perl/5.42.0/x86_64-linux-thread-multi/auto/X11/XCB/XCB.so: undefined symbol: xcb_composite_unredirect_window at /nix/store/...-perl-5.42.0/lib/perl5/5.42.0/XSLoader.pm line 94. at /nix/store/...-perl5.42.0-X11-XCB-0.24/lib/perl5/site_perl/5.42.0/x86_64-linux-thread-multi/X11/XCB.pm line 16. Compilation failed in require at /build/source/testcases/lib/i3test/Util.pm line 8. BEGIN failed--compilation aborted at /build/source/testcases/lib/i3test/Util.pm line 8. Compilation failed in require at ./complete-run.pl line 22. BEGIN failed--compilation aborted at ./complete-run.pl line 22. ***** Error: complete-run.pl returned 2 ===== Test log ===== cat: latest/complete-run.log: No such file or directory ``` --- pkgs/top-level/perl-packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 6107601bb2ac..7f9b9dd29b46 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -38248,6 +38248,15 @@ with self; url = "mirror://cpan/authors/id/Z/ZH/ZHMYLOVE/X11-XCB-0.24.tar.gz"; hash = "sha256-eIUZZzpDxHUecwYaiCG2WPyV8G1cGcnx3rtgX7ILoEU="; }; + patches = [ + # Fix "undefined symbol: xcb_composite_unredirect_window" + (fetchpatch { + url = "https://github.com/zhmylove/X11-XCB/commit/b78e33f7cdf8141b085a4f8773adda6c4a4870c3.patch"; + hash = "sha256-r1X/tGCALZOS35fNx/9udznNvLxC73o7M2U1MVqXcf0="; + revert = true; + excludes = [ "lib/X11/XCB.pm" ]; + }) + ]; env.AUTOMATED_TESTING = false; nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = [