Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions pkgs/applications/networking/browsers/ladybird/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
, pkg-config
, libaom
, libavif
, libjxl
, libtiff
, libwebp
, libxcrypt
, libyuv
, python3
, qt6Packages
, woff2
, ffmpeg
, simdutf
, skia
, nixosTests
, AppKit
Expand Down Expand Up @@ -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 = ''
Expand All @@ -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 = ''
Expand Down Expand Up @@ -125,10 +141,13 @@ stdenv.mkDerivation (finalAttrs: {
ffmpeg
libaom
libavif
libjxl
libwebp
libxcrypt
libyuv
qtbase
qtmultimedia
simdutf
skia
woff2
] ++ lib.optional stdenv.isLinux [
Expand Down
12 changes: 12 additions & 0 deletions pkgs/by-name/sk/skia/export-SkFontMgr_New_FontConfig.patch
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 7 additions & 0 deletions pkgs/by-name/sk/skia/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down