anchor.diff:      "-DENABLE_UNICODE_DATABASE_DOWNLOAD=false"
     ];
   
  -  NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
  -
  -  # Upstream install rules are missing
  -  # https://github.com/awesomekling/ladybird/issues/36
  -  installPhase = ''
  -    runHook preInstall
  -    install -Dm755 ladybird $out/bin/ladybird
  -    mkdir -p $out/lib/ladybird
  -    cp -d _deps/lagom-build/*.so* $out/lib/ladybird/
  -    runHook postInstall
  -  '';
  -
  -  # Patch rpaths
  -  # https://github.com/awesomekling/ladybird/issues/36
  -  preFixup = ''
  -    for f in $out/bin/ladybird $out/lib/ladybird/*.so; do
  -      old_rpath=$(patchelf --print-rpath "$f")
  -      # Remove reference to libraries from build directory
  -      rpath_without_build=$(sed -e 's@[^:]*/_deps/lagom-build:@@g' <<< $old_rpath)
  -      # Add directory where we install those libraries
  -      new_rpath=$out/lib/ladybird:$rpath_without_build
  -      patchelf --set-rpath "$new_rpath" "$f"
  -    done
  -  '';
  -
  -  # According to the readme, the program needs access to the serenity sources
  -  # at runtime
  -  postFixup = ''
  -    wrapProgram $out/bin/ladybird --set SERENITY_SOURCE_DIR "${serenity}"
  -  '';
  -
  -  # Stripping results in a symbol lookup error
  -  dontStrip = true;
  -
     passthru.tests = {
       nixosTest = nixosTests.ladybird;
     };
  
positive.code: , ninja
  , unzip
  , wrapQtAppsHook
  , makeWrapper
  , qtbase
  , qttools
  , nixosTests
  
negative.code: let serenity = fetchFromGitHub {
    owner = "SerenityOS";
    repo = "serenity";
    rev = "a0f3e2c9a2b82117aa7c1a3444ad0d31baa070d5";
    hash = "sha256-8Xde59ZfdkTD39mYSv0lfFjBHFDWTUwfozE+Q9Yq6C8=";
  };
  
  in gcc11Stdenv.mkDerivation {
    pname = "ladybird";
    version = "unstable-2022-09-29";
  
    # Remember to update `serenity` too!
    src = fetchFromGitHub {
      owner = "SerenityOS";
      repo = "ladybird";
      rev = "d69ad7332477de33bfd1963026e057d55c6f222d";
      hash = "sha256-XQj2Bohk8F6dGCAManOmmDP5b/SqEeZXZbLDYPfvi2E=";
    };
  
    nativeBuildInputs = [
  