about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/browsers')
-rw-r--r--pkgs/applications/networking/browsers/ladybird/default.nix8
-rw-r--r--pkgs/applications/networking/browsers/ladybird/nixos-font-path.patch12
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 80beebd5bb7c5..db00c8754791e 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 0000000000000..468eb10b2c313
--- /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())),