From f4cc9c6426e7f697687531d7b4ee6070ec685cff Mon Sep 17 00:00:00 2001 From: Jess Date: Sun, 1 Dec 2024 14:12:10 +0000 Subject: [PATCH] Docs: Update Nixos build instructions --- Documentation/BuildInstructionsLadybird.md | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/Documentation/BuildInstructionsLadybird.md b/Documentation/BuildInstructionsLadybird.md index 5356848f2f8..e6a7937f430 100644 --- a/Documentation/BuildInstructionsLadybird.md +++ b/Documentation/BuildInstructionsLadybird.md @@ -102,24 +102,37 @@ sudo xbps-install -S git bash gcc python3 curl cmake zip unzip linux-headers mak ### NixOS or with Nix: > [!NOTE] -> These steps are out of date, as vcpkg does not work with Nix. -> Please refer to the nixpkgs package for the most up-to-date build instructions. -> +> Ladybird's build system uses vcpkg to vendor third-party dependencies, which proves undesirable to use with Nix for [several reasons](https://github.com/LadybirdBrowser/ladybird/issues/371). +> As a result, using `ladybird.sh` to compile and run Ladybird will fail. Therefore, it is necessary to use system packages provided by the dev-shell. + +To build the project, first enter the shell: ```console nix develop -# With a custom entrypoint, for example your favorite shell +# With a custom entrypoint, for example, your favorite shell nix develop --command bash + +# Using nix-shell +nix-shell UI + +# Using nix-shell and a custom shell +nix-shell UI --command bash ``` -On NixOS or with Nix using your host `nixpkgs` and the legacy `nix-shell` tool: -```console -nix-shell Ladybird +Then invoke `cmake` directly. For example: -# With a custom entrypoint, for example your favorite shell -nix-shell --command bash Ladybird ``` +cmake -GNinja -BBuild/release +``` + +Finally, run `ninja` (or the generator you're using) to start the build: + +``` +ninja -CBuild/release +``` + +For more information, see [Custom CMake build directory](#custom-cmake-build-directory) and [Running manually](#running-manually). ### macOS: