Docs: Update Nixos build instructions

This commit is contained in:
Jess 2024-12-01 14:12:10 +00:00 committed by Andrew Kaster
commit f4cc9c6426
Notes: github-actions[bot] 2024-12-01 18:28:55 +00:00

View file

@ -102,24 +102,37 @@ sudo xbps-install -S git bash gcc python3 curl cmake zip unzip linux-headers mak
### NixOS or with Nix: ### NixOS or with Nix:
> [!NOTE] > [!NOTE]
> These steps are out of date, as vcpkg does not work with Nix. > 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).
> Please refer to the nixpkgs package for the most up-to-date build instructions. > 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 ```console
nix develop nix develop
# With a custom entrypoint, for example your favorite shell # With a custom entrypoint, for example, your favorite shell
nix develop --command bash 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: Then invoke `cmake` directly. For example:
```console
nix-shell Ladybird
# 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: ### macOS: