mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-09 15:58:05 +02:00
docs: installable remove alternate expression flag (#11254)
This commit is contained in:
parent
ea1f87ecda
commit
5a6e28e166
1 changed files with 4 additions and 4 deletions
|
@ -65,7 +65,7 @@ The following types of installable are supported by most commands:
|
||||||
- [Nix file](#nix-file), optionally qualified by an attribute path
|
- [Nix file](#nix-file), optionally qualified by an attribute path
|
||||||
- Specified with `--file`/`-f`
|
- Specified with `--file`/`-f`
|
||||||
- [Nix expression](#nix-expression), optionally qualified by an attribute path
|
- [Nix expression](#nix-expression), optionally qualified by an attribute path
|
||||||
- Specified with `--expr`/`-E`
|
- Specified with `--expr`
|
||||||
|
|
||||||
For most commands, if no installable is specified, `.` is assumed.
|
For most commands, if no installable is specified, `.` is assumed.
|
||||||
That is, Nix will operate on the default flake output attribute of the flake in the current directory.
|
That is, Nix will operate on the default flake output attribute of the flake in the current directory.
|
||||||
|
@ -200,17 +200,17 @@ operate are determined as follows:
|
||||||
…
|
…
|
||||||
```
|
```
|
||||||
|
|
||||||
For `-e`/`--expr` and `-f`/`--file`, the derivation output is specified as part of the attribute path:
|
For `--expr` and `-f`/`--file`, the derivation output is specified as part of the attribute path:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ nix build -f '<nixpkgs>' 'glibc^dev,static'
|
$ nix build -f '<nixpkgs>' 'glibc^dev,static'
|
||||||
$ nix build --impure -E 'import <nixpkgs> { }' 'glibc^dev,static'
|
$ nix build --impure --expr 'import <nixpkgs> { }' 'glibc^dev,static'
|
||||||
```
|
```
|
||||||
|
|
||||||
This syntax is the same even if the actual attribute path is empty:
|
This syntax is the same even if the actual attribute path is empty:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ nix build -E 'let pkgs = import <nixpkgs> { }; in pkgs.glibc' '^dev,static'
|
$ nix build --impure --expr 'let pkgs = import <nixpkgs> { }; in pkgs.glibc' '^dev,static'
|
||||||
```
|
```
|
||||||
|
|
||||||
* You can also specify that *all* outputs should be used using the
|
* You can also specify that *all* outputs should be used using the
|
||||||
|
|
Loading…
Reference in a new issue