From c206ff57fff7787c1431e99753057ae96b753a47 Mon Sep 17 00:00:00 2001 From: Aiden Schembri Date: Sat, 24 Oct 2026 19:09:55 +0200 Subject: [PATCH 1/4] zmij: init at 1.2 --- pkgs/by-name/zm/zmij/package.nix | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkgs/by-name/zm/zmij/package.nix diff --git a/pkgs/by-name/zm/zmij/package.nix b/pkgs/by-name/zm/zmij/package.nix new file mode 100644 index 000000000000..cb2e333decd8 --- /dev/null +++ b/pkgs/by-name/zm/zmij/package.nix @@ -0,0 +1,37 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "zmij"; + version = "1.2"; + + src = fetchFromGitHub { + owner = "vitaut"; + repo = "zmij"; + tag = "v${finalAttrs.version}"; + hash = "sha256-2tppKuONy9IS5IzGJF+4bqAav3aaQMZjiQCMoi5WscE="; + }; + + strictDeps = true; + __structuredAttrs = true; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + (lib.cmakeBool "ZMIJ_TEST" false) + (lib.cmakeBool "ZMIJ_EXAMPLE" false) + ]; + + meta = { + description = "Fast floating-point-to-string conversion library"; + homepage = "https://github.com/vitaut/zmij"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ schembriaiden ]; + platforms = lib.platforms.all; + }; +}) From bc98ebcdc23402f98d12a74d11ad09435b66540c Mon Sep 17 00:00:00 2001 From: Aiden Schembri Date: Sat, 24 Oct 2026 19:11:58 +0200 Subject: [PATCH 2/4] wuffs: 0.4.0-alpha.9 -> 0.3.6 --- pkgs/by-name/wu/wuffs/package.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/wu/wuffs/package.nix b/pkgs/by-name/wu/wuffs/package.nix index cc3002541f3e..1239b3425ca5 100644 --- a/pkgs/by-name/wu/wuffs/package.nix +++ b/pkgs/by-name/wu/wuffs/package.nix @@ -18,7 +18,7 @@ let in buildGoModule (finalAttrs: { pname = "wuffs"; - version = "0.4.0-alpha.9"; + version = "0.3.6"; outputs = [ "out" @@ -30,10 +30,10 @@ buildGoModule (finalAttrs: { owner = "google"; repo = "wuffs"; tag = "v" + finalAttrs.version; - hash = "sha256-XbupK4QYnPudUlO5tRWrQRncGHITzJL//Yk/E7WNxYk="; + hash = "sha256-TxvmC5eEuJhAdHh2cSVI9GJHOvFLWIOpAIJA9m4xWYQ="; }; - vendorHash = null; + vendorHash = "sha256-CRzsGHE3K/WWPX0A3B1CvvEdADlxdIhaT5fOtaA3LPo="; nativeBuildInputs = [ makeBinaryWrapper ]; @@ -63,7 +63,7 @@ buildGoModule (finalAttrs: { install -Dm444 -t "$lib/lib" gen/lib/c/${compiler}-dynamic/libwuffs.* - install -Dm444 release/c/wuffs-unsupported-snapshot.c "$dev/include/wuffs/wuffs-v0.4.c" + install -Dm444 release/c/wuffs-v0.3.c "$dev/include/wuffs/wuffs-v0.3.c" install -Dm444 ${pkgconfig} "$dev/lib/pkgconfig/wuffs.pc" ''; @@ -79,7 +79,6 @@ buildGoModule (finalAttrs: { mit asl20 ]; - maintainers = [ - ]; + maintainers = with lib.maintainers; [ schembriaiden ]; }; }) From e0e190f8854673945243a9b5d6e6bf7997bd00e8 Mon Sep 17 00:00:00 2001 From: Aiden Schembri Date: Sat, 24 Oct 2026 20:10:53 +0200 Subject: [PATCH 3/4] nixosTests.ladybird: add PDF viewer test --- nixos/tests/ladybird.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nixos/tests/ladybird.nix b/nixos/tests/ladybird.nix index 216c8f4418bc..1f8aa6ed6879 100644 --- a/nixos/tests/ladybird.nix +++ b/nixos/tests/ladybird.nix @@ -2,7 +2,10 @@ { name = "ladybird"; meta = with pkgs.lib.maintainers; { - maintainers = [ fgaz ]; + maintainers = [ + fgaz + schembriaiden + ]; }; nodes.machine = @@ -14,6 +17,10 @@ services.xserver.enable = true; programs.ladybird.enable = true; + environment.systemPackages = [ + pkgs.groff + pkgs.groff.perl + ]; }; enableOCR = true; @@ -28,5 +35,12 @@ machine.send_key("ctrl-tab") machine.wait_for_text("Hello world") machine.screenshot("screen") + + # Check that the PDF.js viewer renders the document, not just its toolbar. + machine.succeed("printf '.ps 32\\n.sp 1i\\nPDF rendering works\\n' | SOURCE_DATE_EPOCH=1 groff -Tpdf > /tmp/ladybird-test.pdf") + machine.send_key("ctrl-l") + machine.send_chars("file:///tmp/ladybird-test.pdf\n") + machine.wait_for_text("PDF rendering works") + machine.screenshot("pdf") ''; } From 25384c1062254e4ddfbf511fb001ac57e76b600e Mon Sep 17 00:00:00 2001 From: Aiden Schembri Date: Sat, 24 Oct 2026 20:10:56 +0200 Subject: [PATCH 4/4] ladybird: 0-unstable-2026-10-14 -> 0-unstable-2026-10-24 --- pkgs/by-name/la/ladybird/darwin-build.patch | 24 +---------- pkgs/by-name/la/ladybird/package.nix | 45 ++++----------------- 2 files changed, 10 insertions(+), 59 deletions(-) diff --git a/pkgs/by-name/la/ladybird/darwin-build.patch b/pkgs/by-name/la/ladybird/darwin-build.patch index de0512b8ec8a..d58a424e6560 100644 --- a/pkgs/by-name/la/ladybird/darwin-build.patch +++ b/pkgs/by-name/la/ladybird/darwin-build.patch @@ -1,19 +1,10 @@ -Link LibGfx's direct CoreText calls explicitly and use Nix dependencies -instead of searching the host's Homebrew installation. +Use Nix dependencies instead of searching the host's Homebrew installation. Defer bundle signing until postFixup, after Nix has finished modifying it. -Use rcodesign for helper and Cranelift compiler signing during the build. +Use rcodesign for helper signing during the build. Provide a default CA bundle to both curl and the RequestServer sandbox when no certificate file was supplied explicitly. ---- a/Libraries/LibGfx/CMakeLists.txt -+++ b/Libraries/LibGfx/CMakeLists.txt -@@ -105,4 +105,5 @@ - - if (APPLE) -+ target_link_libraries(LibGfx PRIVATE "-framework CoreText") - target_link_libraries(LibGfx PRIVATE "-framework Metal" "-framework Accelerate") - endif() --- a/Meta/CMake/compile_options.cmake +++ b/Meta/CMake/compile_options.cmake @@ -210,7 +210,6 @@ @@ -79,14 +70,3 @@ when no certificate file was supplied explicitly. VERBATIM ) endfunction() ---- a/Libraries/LibWasm/CMakeLists.txt -+++ b/Libraries/LibWasm/CMakeLists.txt -@@ -50,7 +50,7 @@ - set(cranelift_compiler_signed_stamp "${CMAKE_CURRENT_BINARY_DIR}/cranelift_compiler_signed.stamp") - add_custom_command( - OUTPUT "${cranelift_compiler_signed_stamp}" -- COMMAND codesign -s - -f -o runtime "${WASM_CRANELIFT_COMPILER_BINARY}" -+ COMMAND rcodesign sign --code-signature-flags runtime "${WASM_CRANELIFT_COMPILER_BINARY}" - COMMAND "${CMAKE_COMMAND}" -E touch "${cranelift_compiler_signed_stamp}" - DEPENDS "${WASM_CRANELIFT_COMPILER_BINARY}" - VERBATIM diff --git a/pkgs/by-name/la/ladybird/package.nix b/pkgs/by-name/la/ladybird/package.nix index b403aadaeb3b..8fe4cb0966b2 100644 --- a/pkgs/by-name/la/ladybird/package.nix +++ b/pkgs/by-name/la/ladybird/package.nix @@ -5,7 +5,6 @@ darwinMinVersionHook, cacert, fetchFromGitHub, - fetchzip, pdfjs, chromium-hsts-preload-list, cmake, @@ -61,35 +60,23 @@ vulkan-loader, vulkan-memory-allocator, zlib, + zmij, }: -let - # The integration patch shipped by Ladybird targets this PDF.js version. - pdfjsForLadybird = pdfjs.overrideAttrs ( - final: _prev: { - version = "5.6.205"; - src = fetchzip { - url = "https://github.com/mozilla/pdf.js/releases/download/v${final.version}/pdfjs-${final.version}-dist.zip"; - hash = "sha256-JMmxoT68PNJ/MmlMwVNYcHerorklLv5YY6C55xjn73w="; - stripRoot = false; - }; - } - ); -in stdenv.mkDerivation (finalAttrs: { pname = "ladybird"; - version = "0-unstable-2026-10-14"; + version = "0-unstable-2026-10-24"; src = fetchFromGitHub { owner = "LadybirdBrowser"; repo = "ladybird"; - rev = "41e923c58147fd7ff64dcbc1ea52456ddf235c3c"; - hash = "sha256-LQAe+TkqdpWU0ipq3pkuEwx0fhl0RlTPG+xxEBAjTMY="; + rev = "7e15f8e935189b116dd178537849f2e1c94ed764"; + hash = "sha256-xsvPE6mpbHreBvIfbmpONQywlUkE6uF6dZKzHU8M/eE="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; - hash = "sha256-r4HKvfwDqcH3nuS72+PmgP9xmlG5yPvmxtGrwbTodSU="; + hash = "sha256-pPS3GJsDcvzZAEQina1v6SGPLmhtetXUX5+paTRY428="; }; patches = [ @@ -107,7 +94,6 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' sed -i '/iconutil/d' UI/CMakeLists.txt - # https://github.com/LadybirdBrowser/ladybird/pull/12751 # New Rust releases can deprecate APIs used by this snapshot. substituteInPlace Meta/CMake/rust_crate.cmake \ @@ -117,7 +103,6 @@ stdenv.mkDerivation (finalAttrs: { # Use nixpkgs' FFmpeg, which already provides the additional decoders. substituteInPlace Meta/CMake/check_for_dependencies.cmake \ --replace-fail libavcodec-ladybird libavcodec \ - --replace-fail libavformat-ladybird libavformat \ --replace-fail libavutil-ladybird libavutil \ --replace-fail libswresample-ladybird libswresample @@ -126,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: { Meta/CMake/check_for_dependencies.cmake # Install the same PDF viewer assets and integration patch as the vcpkg build. - cp -r ${pdfjsForLadybird}/share/pdf.js pdfjs + cp -r ${pdfjs}/share/pdf.js pdfjs chmod -R u+w pdfjs patch -d pdfjs -p1 < Meta/CMake/vcpkg/overlay-ports/pdfjs/0001-ladybird-embed.patch substituteInPlace UI/cmake/ResourceFiles.cmake \ @@ -220,27 +205,13 @@ stdenv.mkDerivation (finalAttrs: { $out/include/skia/src/utils/mac/SkUniqueCFRef.h ''; })) - (wuffs.overrideAttrs (prev: { - # Ladybird includes the stable 0.3 single-file library. - version = "0.3.4"; - vendorHash = "sha256-CRzsGHE3K/WWPX0A3B1CvvEdADlxdIhaT5fOtaA3LPo="; - src = fetchFromGitHub { - owner = "google"; - repo = "wuffs"; - tag = "v0.3.4"; - hash = "sha256-XiaHus+bZ4jAk2zwinzz7VzyThCNlx36Auqyw2OH5rM="; - }; - postInstall = - lib.replaceStrings - [ "release/c/wuffs-unsupported-snapshot.c" "wuffs-v0.4.c" ] - [ "release/c/wuffs-v0.3.c" "wuffs-v0.3.c" ] - prev.postInstall; - })) + wuffs woff2 icu78 simdjson sqlite zlib + zmij ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio.dev