Skip to content

Commit b95e777

Browse files
networkExceptionAtkinsSJ
authored andcommitted
Documentation: Improve nix related commands
This patch fixes `nix develop` commands not using proper paths, uses the serenity root directory as an assumption for all commands and adds variants of nix commands to use a custom entry point, for example a shell.
1 parent 2016287 commit b95e777

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

Documentation/BuildInstructionsLadybird.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,22 @@ On openSUSE:
3434
sudo zypper install cmake libglvnd-devel ninja qt6-base-devel qt6-multimedia-devel qt6-tools-devel qt6-wayland-devel ccache
3535
```
3636

37-
On Nix/NixOS:
38-
```
39-
nix-shell ladybird.nix
37+
On Nix/NixOS (using your host nixpkgs):
38+
```bash
39+
# From /path/to/serenity
40+
nix-shell Ladybird/ladybird.nix
41+
42+
# With a custom entrypoint, for example your favorite shell
43+
nix-shell --command bash Ladybird/ladybird.nix
4044
```
45+
4146
You can also use the nix flake in `Toolchain`:
42-
```
43-
nix develop Toolchain/#ladybird
47+
```bash
48+
# From /path/to/serenity
49+
nix develop ./Toolchain#ladybird
50+
51+
# With a custom entrypoint, for example your favorite shell
52+
nix develop ./Toolchain#ladybird --command bash
4453
```
4554

4655
On macOS:

Documentation/BuildInstructionsOther.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ apt-get install curl cmake libmpc-devel gmp-devel e2fsprogs libmpfr-devel ninja-
2727

2828
## NixOS
2929

30-
You can use the `nix-shell` script [`Toolchain/serenity.nix`](../Toolchain/serenity.nix) to set up the environment:
30+
You can use the `nix-shell` script [`Toolchain/serenity.nix`](../Toolchain/serenity.nix) to set up the environment (using your host nixpkgs):
3131

3232
```console
3333
nix-shell Toolchain/serenity.nix
34+
35+
# With a custom entrypoint, for example your favorite shell
36+
nix-shell --command bash Toolchain/serenity.nix
3437
```
3538

3639
or you can use the nix flake [`Toolchain/flake.nix`](../Toolchain/flake.nix) instead:
3740

3841
```console
39-
nix develop Toolchain
42+
nix develop ./Toolchain#
43+
44+
# With a custom entrypoint, for example your favorite shell
45+
nix develop ./Toolchain# --command bash
4046
```
4147

4248
You can also save this environment to a profile:

0 commit comments

Comments
 (0)