Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge queue: embarking 2.24-maintenance (f393260) and [#12195 + #12194 + #12196 + #12198 + #12199] together #12224

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion doc/manual/src/command-ref/nix-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ These pages can be viewed offline:

Several operations, such as [`nix-env --query`](./nix-env/query.md) and [`nix-env --install`](./nix-env/install.md), take a list of *arguments* that specify the packages on which to operate.

Packages are identified based on a `name` part and a `version` part of a [symbolic derivation name](@docroot@/language/derivations.md#attr-names):
Packages are identified based on a `name` part and a `version` part of a [symbolic derivation name](@docroot@/language/derivations.md#attr-name):

- `name`: Everything up to but not including the first dash (`-`) that is *not* followed by a letter.
- `version`: The rest, excluding the separating dash.
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/src/language/derivations.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ It outputs an attribute set, and produces a [store derivation] as a side effect

### Optional

- [`args`]{#attr-args} ([List](@docroot@/language/types.md#list) of [String](@docroot@/language/types.md#type-string))
- [`args`]{#attr-args} ([List](@docroot@/language/types.md#type-list) of [String](@docroot@/language/types.md#type-string))

Default: `[ ]`

Expand All @@ -132,7 +132,7 @@ It outputs an attribute set, and produces a [store derivation] as a side effect
> };
> ```

- [`outputs`]{#attr-outputs} ([List](@docroot@/language/types.md#list) of [String](@docroot@/language/types.md#type-string))
- [`outputs`]{#attr-outputs} ([List](@docroot@/language/types.md#type-list) of [String](@docroot@/language/types.md#type-string))

Default: `[ "out" ]`

Expand Down
7 changes: 6 additions & 1 deletion doc/manual/src/language/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@
[string]: ./types.md#type-string
[path]: ./types.md#type-path
[number]: ./types.md#type-float
<<<<<<< HEAD
[list]: ./types.md#list
[attribute set]: ./types.md#attribute-set
=======
[list]: ./types.md#type-list
[attribute set]: ./types.md#type-attrs
>>>>>>> 071ddbed5 (doc/manual: Fix some broken fragments)

<!-- TODO(@rhendric, #10970): ^ rationalize number -> int/float -->

Expand All @@ -59,7 +64,7 @@ The result is a [Boolean] value.

See also: [`builtins.hasAttr`](@docroot@/language/builtins.md#builtins-hasAttr)

[Boolean]: ./types.md#type-boolean
[Boolean]: ./types.md#type-bool

[Has attribute]: #has-attribute

Expand Down
2 changes: 1 addition & 1 deletion doc/manual/src/release-notes/rl-2.23.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
Nix can now warn when evaluation of a Nix expression causes a large
path to be copied to the Nix store. The threshold for this warning can
be configured using [the `warn-large-path-threshold`
setting](@docroot@/command-ref/conf-file.md#warn-large-path-threshold),
setting](@docroot@/command-ref/conf-file.md#conf-warn-large-path-threshold),
e.g. `--warn-large-path-threshold 100M` will warn about paths larger
than 100 MiB.

2 changes: 1 addition & 1 deletion src/libcmd/installables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ MixFlakeOptions::MixFlakeOptions()

> **DEPRECATED**
>
> Use [`--no-use-registries`](#opt-no-use-registries) instead.
> Use [`--no-use-registries`](@docroot@/command-ref/conf-file.md#conf-use-registries) instead.
)",
.category = category,
.handler = {[&]() {
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/unix/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ void LocalDerivationGoal::runChild()
if (chdir(chrootRootDir.c_str()) == -1)
throw SysError("cannot change directory to '%1%'", chrootRootDir);

if (mkdir("real-root", 0) == -1)
if (mkdir("real-root", 0500) == -1)
throw SysError("cannot create real-root directory");

if (pivot_root(".", "real-root") == -1)
Expand Down
14 changes: 13 additions & 1 deletion src/nix/flake-archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,20 @@ R""(
# nix flake archive --json --dry-run nixops
```

* Upload all flake inputs to a different machine for remote evaluation

```
# nix flake archive --to ssh://some-machine
```

On the remote machine the flake can then be accessed via its store path. That's computed like this:

```
# nix flake metadata --json | jq -r '.path'
```

# Description

FIXME
Copy a flake and all its inputs to a store. This is useful i.e. to evaluate flakes on a different host.

)""
6 changes: 3 additions & 3 deletions src/nix/flake-lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ R""(

# Description

This command adds inputs to the lock file of a flake (`flake.lock`)
so that it contains a lock for every flake input specified in
`flake.nix`. Existing lock file entries are not updated.
This command updates the lock file of a flake (`flake.lock`)
so that it contains an up-to-date lock for every flake input specified in
`flake.nix`. Lock file entries are aready up-to-date are not modified.

If you want to update existing lock entries, use
[`nix flake update`](@docroot@/command-ref/new-cli/nix3-flake-update.md)
Expand Down
13 changes: 13 additions & 0 deletions src/nix/flake-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ R""(
→ 'github:NixOS/nixpkgs/a3a3dda3bacf61e8a39258a0ed9c924eeca8e293' (2023-07-05)
```

* Update multiple inputs:

```console
# nix flake update nixpkgs nixpkgs-unstable
warning: updating lock file '/home/myself/repos/testflake/flake.lock':
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/8f7492cce28977fbf8bd12c72af08b1f6c7c3e49' (2024-09-14)
→ 'github:nixos/nixpkgs/086b448a5d54fd117f4dc2dee55c9f0ff461bdc1' (2024-09-16)
• Updated input 'nixpkgs-unstable':
'github:nixos/nixpkgs/345c263f2f53a3710abe117f28a5cb86d0ba4059' (2024-09-13)
→ 'github:nixos/nixpkgs/99dc8785f6a0adac95f5e2ab05cc2e1bf666d172' (2024-09-16)
```

* Update only a single input of a flake in a different directory:

```console
Expand Down
2 changes: 1 addition & 1 deletion src/nix/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ R""(
# Description

`nix shell` runs a command in an environment in which the `$PATH` variable
provides the specified [*installables*](./nix.md#installable). If no command is specified, it starts the
provides the specified [*installables*](./nix.md#installables). If no command is specified, it starts the
default shell of your user account specified by `$SHELL`.

# Use as a `#!`-interpreter
Expand Down
Loading