diff options
author | Francesco Gazzetta | 2024-05-27 11:35:25 +0200 |
---|---|---|
committer | Francesco Gazzetta | 2024-05-31 17:19:23 +0000 |
commit | c41846f7587a15ba188d63294f1f1c5cca5ed9a5 (patch) | |
tree | 1caad51317ae91d134fdf27a811d7b15a93a814f | |
parent | 9df33e951839384ec9344c3e594404a05dceee71 (diff) |
ladybird: search for fonts in NixOS-specific paths
Fixes #314604 (cherry picked from commit 2058c78327e6da183304fc441d237561edd6ff75)
-rw-r--r-- | pkgs/applications/networking/browsers/ladybird/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/networking/browsers/ladybird/nixos-font-path.patch | 12 |
2 files changed, 18 insertions, 2 deletions
diff --git a/pkgs/applications/networking/browsers/ladybird/default.nix b/pkgs/applications/networking/browsers/ladybird/default.nix index 80beebd5bb7c..db00c8754791 100644 --- a/pkgs/applications/networking/browsers/ladybird/default.nix +++ b/pkgs/applications/networking/browsers/ladybird/default.nix @@ -59,18 +59,22 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-+g/1F/v8nTVbvtSrtyvQbeYacjTlfRpg+Htu0lRlkcU="; }; - sourceRoot = "${finalAttrs.src.name}/Ladybird"; + patches = [ + ./nixos-font-path.patch + ]; postPatch = '' sed -i '/iconutil/d' CMakeLists.txt # Don't set absolute paths in RPATH - substituteInPlace ../Meta/CMake/lagom_install_options.cmake \ + substituteInPlace Meta/CMake/lagom_install_options.cmake \ --replace-fail "\''${CMAKE_INSTALL_BINDIR}" "bin" \ --replace-fail "\''${CMAKE_INSTALL_LIBDIR}" "lib" ''; preConfigure = '' + cd Ladybird + # Setup caches for LibLocale, LibUnicode, LibTimezone, LibTLS and LibGfx # Note that the versions of the input data packages must match the # expected version in the package's CMake. diff --git a/pkgs/applications/networking/browsers/ladybird/nixos-font-path.patch b/pkgs/applications/networking/browsers/ladybird/nixos-font-path.patch new file mode 100644 index 000000000000..468eb10b2c31 --- /dev/null +++ b/pkgs/applications/networking/browsers/ladybird/nixos-font-path.patch @@ -0,0 +1,12 @@ +diff --git a/Userland/Libraries/LibCore/StandardPaths.cpp b/Userland/Libraries/LibCore/StandardPaths.cpp +index 77ddbeb9..76481497 100644 +--- a/Userland/Libraries/LibCore/StandardPaths.cpp ++++ b/Userland/Libraries/LibCore/StandardPaths.cpp +@@ -205,6 +205,7 @@ ErrorOr<Vector<String>> StandardPaths::font_directories() + "/Library/Fonts"_string, + TRY(String::formatted("{}/Library/Fonts"sv, home_directory())), + # else ++ "/run/current-system/sw/share/X11/fonts"_string, + "/usr/share/fonts"_string, + "/usr/local/share/fonts"_string, + TRY(String::formatted("{}/.local/share/fonts"sv, home_directory())), |