Skip to content

Commit 0db10fc

Browse files
authored
Merge pull request #12977 from Mic92/docs
Docs: fix "building" documentation w.r.t. meson
2 parents e088ab3 + c12fd7b commit 0db10fc

File tree

16 files changed

+35
-29
lines changed

16 files changed

+35
-29
lines changed

doc/manual/generate-deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# literally. since the rules for these aren't even the same for
1515
# all three we will just fail when we encounter any of them (if
1616
# asserts are off for some reason the depfile will likely point
17-
# to nonexistant paths, making everything phony and thus fine.)
17+
# to nonexistent paths, making everything phony and thus fine.)
1818
for path in glob.glob(sys.argv[1] + '/**', recursive=True):
1919
assert '\\' not in path
2020
assert ' ' not in path

doc/manual/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ subdir('source/release-notes')
6767
subdir('source')
6868

6969
# Hacky way to figure out if `nix` is an `ExternalProgram` or
70-
# `Exectuable`. Only the latter can occur in custom target input lists.
70+
# `Executable`. Only the latter can occur in custom target input lists.
7171
if nix.full_path().startswith(meson.build_root())
7272
nix_input = nix
7373
else

doc/manual/source/command-ref/nix-env/delete-generations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This operation deletes the specified generations of the current profile.
2727
>
2828
> Older *and newer* generations will be deleted by this operation.
2929
>
30-
> One might expect this to just delete older generations than the curent one, but that is only true if the current generation is also the latest.
30+
> One might expect this to just delete older generations than the current one, but that is only true if the current generation is also the latest.
3131
> Because one can roll back to a previous generation, it is possible to have generations newer than the current one.
3232
> They will also be deleted.
3333

doc/manual/source/development/building.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,25 @@ Nix uses a string with the following format to identify the *system type* or *pl
195195
<cpu>-<os>[-<abi>]
196196
```
197197

198-
It is set when Nix is compiled for the given system, and based on the output of [`config.guess`](https://github.com/nixos/nix/blob/master/config/config.guess) ([upstream](https://git.savannah.gnu.org/cgit/config.git/tree/config.guess)):
198+
It is set when Nix is compiled for the given system, and based on the output of Meson's [`host_machine` information](https://mesonbuild.com/Reference-manual_builtin_host_machine.html)>
199199

200200
```
201201
<cpu>-<vendor>-<os>[<version>][-<abi>]
202202
```
203203

204-
When Nix is built such that `./configure` is passed any of the `--host`, `--build`, `--target` options, the value is based on the output of [`config.sub`](https://github.com/nixos/nix/blob/master/config/config.sub) ([upstream](https://git.savannah.gnu.org/cgit/config.git/tree/config.sub)):
204+
When cross-compiling Nix with Meson for local development, you need to specify a [cross-file](https://mesonbuild.com/Cross-compilation.html) using the `--cross-file` option. Cross-files define the target architecture and toolchain. When cross-compiling Nix with Nix, Nixpkgs takes care of this for you.
205+
206+
In the nix flake we also have some cross-compilation targets available:
205207

206208
```
207-
<cpu>-<vendor>[-<kernel>]-<os>
209+
nix build .#nix-everything-riscv64-unknown-linux-gnu
210+
nix build .#nix-everything-armv7l-unknown-linux-gnueabihf
211+
nix build .#nix-everything-armv7l-unknown-linux-gnueabihf
212+
nix build .#nix-everything-x86_64-unknown-freebsd
213+
nix build .#nix-everything-x86_64-w64-mingw32
208214
```
209215

210-
For historic reasons and backward-compatibility, some CPU and OS identifiers are translated from the GNU Autotools naming convention in [`configure.ac`](https://github.com/nixos/nix/blob/master/configure.ac) as follows:
216+
For historic reasons and backward-compatibility, some CPU and OS identifiers are translated as follows:
211217

212218
| `config.guess` | Nix |
213219
|----------------------------|---------------------|
@@ -230,18 +236,18 @@ Nix can be compiled using multiple environments:
230236
To build with one of those environments, you can use
231237

232238
```console
233-
$ nix build .#nix-ccacheStdenv
239+
$ nix build .#nix-cli-ccacheStdenv
234240
```
235241

236242
for flake-enabled Nix, or
237243

238244
```console
239-
$ nix-build --attr nix-ccacheStdenv
245+
$ nix-build --attr nix-cli-ccacheStdenv
240246
```
241247

242248
for classic Nix.
243249

244-
You can use any of the other supported environments in place of `nix-ccacheStdenv`.
250+
You can use any of the other supported environments in place of `nix-cli-ccacheStdenv`.
245251

246252
## Editor integration
247253

doc/manual/source/development/cli-guideline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ sensitive.
170170

171171

172172
```shell
173-
$ nix init --template=template#pyton
173+
$ nix init --template=template#python
174174
------------------------------------------------------------------------
175-
Error! Template `template#pyton` not found.
175+
Error! Template `template#python` not found.
176176
------------------------------------------------------------------------
177177
Initializing Nix project at `/path/to/here`.
178178
Select a template for you new project:

doc/manual/source/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343

344344
See [Nix Archive](store/file-system-object/content-address.html#serial-nix-archive) for details.
345345

346-
- [``]{#gloss-emtpy-set}
346+
- [``]{#gloss-empty-set}
347347

348348
The empty set symbol. In the context of profile history, this denotes a package is not present in a particular version of the profile.
349349

doc/manual/source/language/string-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The purpose of string contexts is to collect non-string values attached to strin
1414
[string interpolation](./string-interpolation.md),
1515
and similar operations.
1616
The idea is that a user can reference other files when creating text files through Nix expressions, without manually keeping track of the exact paths.
17-
Nix will ensure that the all referenced files are accessible – that all [store paths](@docroot@/glossary.md#gloss-store-path) are [valid](@docroot@/glossary.md#gloss-validitiy).
17+
Nix will ensure that the all referenced files are accessible – that all [store paths](@docroot@/glossary.md#gloss-store-path) are [valid](@docroot@/glossary.md#gloss-validity).
1818

1919
> **Note**
2020
>

doc/manual/source/protocols/json/derivation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ is a JSON object with the following fields:
2424

2525

2626
* `method`:
27-
For an output which will be [content addresed], a string representing the [method](@docroot@/store/store-object/content-address.md) of content addressing that is chosen.
27+
For an output which will be [content addressed], a string representing the [method](@docroot@/store/store-object/content-address.md) of content addressing that is chosen.
2828
Valid method strings are:
2929

3030
- [`flat`](@docroot@/store/store-object/content-address.md#method-flat)
@@ -35,7 +35,7 @@ is a JSON object with the following fields:
3535
Otherwise, `null`.
3636

3737
* `hashAlgo`:
38-
For an output which will be [content addresed], the name of the hash algorithm used.
38+
For an output which will be [content addressed], the name of the hash algorithm used.
3939
Valid algorithm strings are:
4040

4141
- `blake3`

doc/manual/source/protocols/tarball-fetcher.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ defined as the timestamp of the newest file inside the tarball.
4646
This protocol is supported by Gitea since v1.22.1 and by Forgejo since v7.0.4/v8.0.0 and can be used with the following flake URL schema:
4747

4848
```
49-
https://<domain name>/<owner>/<repo>/archive/<reference or revison>.tar.gz
49+
https://<domain name>/<owner>/<repo>/archive/<reference or revision>.tar.gz
5050
```
5151

5252
> **Example**

doc/manual/source/release-notes/rl-2.19.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- To operate on a flake outside the current directory, you must now pass `--flake path/to/flake`.
3232

3333
- The flake-specific flags `--recreate-lock-file` and `--update-input` have been removed from all commands operating on installables.
34-
They are superceded by `nix flake update`.
34+
They are superseded by `nix flake update`.
3535

3636
- Commit signature verification for the [`builtins.fetchGit`](@docroot@/language/builtins.md#builtins-fetchGit) is added as the new [`verified-fetches` experimental feature](@docroot@/development/experimental-features.md#xp-feature-verified-fetches).
3737

0 commit comments

Comments
 (0)