diff --git a/pkgs/applications/networking/browsers/ladybird/default.nix b/pkgs/applications/networking/browsers/ladybird/default.nix index 033b20dca5ad2..5ed685bcf1831 100644 --- a/pkgs/applications/networking/browsers/ladybird/default.nix +++ b/pkgs/applications/networking/browsers/ladybird/default.nix @@ -13,12 +13,16 @@ , pkg-config , libaom , libavif +, libjxl +, libtiff +, libwebp , libxcrypt , libyuv , python3 , qt6Packages , woff2 , ffmpeg +, simdutf , skia , nixosTests , AppKit @@ -57,13 +61,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "ladybird"; - version = "0-unstable-2024-07-11"; + version = "0-unstable-2024-08-12"; src = fetchFromGitHub { owner = "LadybirdWebBrowser"; repo = "ladybird"; - rev = "da8633b2d0ab3b9d8f1cdad39a8ad85ca2accf03"; - hash = "sha256-NJSuhJWxeGPOVotK+s/mG2bfq19su08wBoxFDs/H9JU="; + rev = "7e57cc7b090455e93261c847064f12a61d686ff3"; + hash = "sha256-8rkgxEfRH8ERuC7iplQKOzKb1EJ4+SNGDX5gTGpOmQo="; }; postPatch = '' @@ -73,6 +77,18 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace Meta/CMake/lagom_install_options.cmake \ --replace-fail "\''${CMAKE_INSTALL_BINDIR}" "bin" \ --replace-fail "\''${CMAKE_INSTALL_LIBDIR}" "lib" + + # libwebp is not built with cmake support yet + # https://github.com/NixOS/nixpkgs/issues/334148 + cat > Meta/CMake/FindWebP.cmake <<'EOF' + find_package(PkgConfig) + pkg_check_modules(WEBP libwebp REQUIRED) + include_directories(''${WEBP_INCLUDE_DIRS}) + link_directories(''${WEBP_LIBRARY_DIRS}) + EOF + substituteInPlace Userland/Libraries/LibGfx/CMakeLists.txt \ + --replace-fail 'WebP::' "" \ + --replace-fail libwebpmux webpmux ''; preConfigure = '' @@ -125,10 +141,13 @@ stdenv.mkDerivation (finalAttrs: { ffmpeg libaom libavif + libjxl + libwebp libxcrypt libyuv qtbase qtmultimedia + simdutf skia woff2 ] ++ lib.optional stdenv.isLinux [ diff --git a/pkgs/by-name/sk/skia/export-SkFontMgr_New_FontConfig.patch b/pkgs/by-name/sk/skia/export-SkFontMgr_New_FontConfig.patch new file mode 100644 index 0000000000000..1609e7347fdeb --- /dev/null +++ b/pkgs/by-name/sk/skia/export-SkFontMgr_New_FontConfig.patch @@ -0,0 +1,12 @@ +diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp +index 7d6fd62..2cca01d 100644 +--- a/src/ports/SkFontMgr_fontconfig.cpp ++++ b/src/ports/SkFontMgr_fontconfig.cpp +@@ -16,6 +16,7 @@ + #include "include/core/SkString.h" + #include "include/core/SkTypeface.h" + #include "include/core/SkTypes.h" ++#include "include/ports/SkFontMgr_fontconfig.h" + #include "include/private/base/SkDebug.h" + #include "include/private/base/SkMutex.h" + #include "include/private/base/SkTArray.h" diff --git a/pkgs/by-name/sk/skia/package.nix b/pkgs/by-name/sk/skia/package.nix index d6fb1940efbe8..af417a06ad092 100644 --- a/pkgs/by-name/sk/skia/package.nix +++ b/pkgs/by-name/sk/skia/package.nix @@ -35,6 +35,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-zHfv4OZK/nVJc2rl+dBSCc4f6qndpAKcFZtThw06+LY="; }; + patches = [ + # Package ladybird uses SkFontMgr_New_FontConfig, but this version of skia + # does not export it. + # https://skia.googlesource.com/skia/+/4bf56844d4a661d7317882cc545ecd978715a11e%5E!/? + ./export-SkFontMgr_New_FontConfig.patch + ]; + postPatch = '' # System zlib detection bug workaround substituteInPlace BUILD.gn \