about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/ladybird/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/browsers/ladybird/default.nix')
-rw-r--r--pkgs/applications/networking/browsers/ladybird/default.nix30
1 files changed, 19 insertions, 11 deletions
diff --git a/pkgs/applications/networking/browsers/ladybird/default.nix b/pkgs/applications/networking/browsers/ladybird/default.nix
index 3be88d290040c..85d85ba2476b1 100644
--- a/pkgs/applications/networking/browsers/ladybird/default.nix
+++ b/pkgs/applications/networking/browsers/ladybird/default.nix
@@ -22,11 +22,11 @@
 
 let
   inherit (builtins) elemAt;
-  cldr_version = "44.1.0";
+  cldr_version = "45.0.0";
   cldr-json = fetchzip {
     url = "https://github.com/unicode-org/cldr-json/releases/download/${cldr_version}/cldr-${cldr_version}-json-modern.zip";
     stripRoot = false;
-    hash = "sha256-EbbzaaspKgRT/dsJV3Kf0Dfj8LN9zT+Pl4gk5kiOXWk=";
+    hash = "sha256-BPDvYjlvJMudX/YlS7HrwKEABYx+1KzjiFlLYA5+Oew=";
     postFetch = ''
       echo -n ${cldr_version} > $out/version.txt
     '';
@@ -50,22 +50,24 @@ let
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "ladybird";
-  version = "0-unstable-2024-03-16";
+  version = "0-unstable-2024-06-04";
 
   src = fetchFromGitHub {
-    owner = "SerenityOS";
-    repo = "serenity";
-    rev = "3a8bde9ef24dace600484b38992fdc7d17bf92c3";
-    hash = "sha256-r8HYcexrOjDYsXuCtROiNY7Rl60pVQBvVQf190gqNuY=";
+    owner = "LadybirdWebBrowser";
+    repo = "ladybird";
+    rev = "c6e9f0e7b5b050ddbb5d735ca9c65458add9b4a5";
+    hash = "sha256-+NDrd0kO9bqXFcCEJFmNwNu5jmf+wT+uUVlmbmCYLw4=";
   };
 
-  sourceRoot = "${finalAttrs.src.name}/Ladybird";
+  patches = [
+    ./nixos-font-path.patch
+  ];
 
   postPatch = ''
-    sed -i '/iconutil/d' CMakeLists.txt
+    sed -i '/iconutil/d' Ladybird/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"
   '';
@@ -74,6 +76,12 @@ stdenv.mkDerivation (finalAttrs: {
     # 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.
+
+    # Check that the versions match
+    grep -F 'set(CLDR_VERSION "${cldr_version}")' Meta/CMake/locale_data.cmake || (echo cldr_version mismatch && exit 1)
+    grep -F 'set(TZDB_VERSION "${tzdata.version}")' Meta/CMake/time_zone_data.cmake || (echo tzdata.version mismatch && exit 1)
+    grep -F 'set(CACERT_VERSION "${cacert_version}")' Meta/CMake/ca_certificates_data.cmake || (echo cacert_version mismatch && exit 1)
+
     mkdir -p build/Caches
 
     ln -s ${cldr-json} build/Caches/CLDR
@@ -149,7 +157,7 @@ stdenv.mkDerivation (finalAttrs: {
   };
 
   meta = with lib; {
-    description = "A browser using the SerenityOS LibWeb engine with a Qt or Cocoa GUI";
+    description = "Browser using the SerenityOS LibWeb engine with a Qt or Cocoa GUI";
     homepage = "https://ladybird.dev";
     license = licenses.bsd2;
     maintainers = with maintainers; [ fgaz ];