forked from lix-project/lix
Qyriad
194ba8a02f
The installables syntax is not documented in any of the man pages or
docbook pages for any of those individual commands. And while these
commands really should at least peripherally individually document how
installables work, in the meantime we can at least direct people to the
right place.
This commit also clarifies the unexpected fact that `nix profile remove`
and `nix profile upgrade` do *not* take installables.
Change-Id: I3b1453cb197a613bbab639c66a466365c3592c6d
52 lines
1.3 KiB
Markdown
52 lines
1.3 KiB
Markdown
R""(
|
|
|
|
**Note:** this command's interface is based heavily around [*installables*](./nix.md#installables), which you may want to read about first (`nix --help`).
|
|
|
|
# Examples
|
|
|
|
* Apply the build environment of GNU hello to the current shell:
|
|
|
|
```console
|
|
# . <(nix print-dev-env nixpkgs#hello)
|
|
```
|
|
|
|
* Get the build environment in JSON format:
|
|
|
|
```console
|
|
# nix print-dev-env nixpkgs#hello --json
|
|
```
|
|
|
|
The output will look like this:
|
|
|
|
```json
|
|
{
|
|
"bashFunctions": {
|
|
"buildPhase": " \n runHook preBuild;\n...",
|
|
...
|
|
},
|
|
"variables": {
|
|
"src": {
|
|
"type": "exported",
|
|
"value": "/nix/store/3x7dwzq014bblazs7kq20p9hyzz0qh8g-hello-2.10.tar.gz"
|
|
},
|
|
"postUnpackHooks": {
|
|
"type": "array",
|
|
"value": ["_updateSourceDateEpochFromSourceRoot"]
|
|
},
|
|
...
|
|
}
|
|
}
|
|
```
|
|
|
|
# Description
|
|
|
|
This command prints a shell script that can be sourced by `bash` and
|
|
that sets the variables and shell functions defined by the build
|
|
process of [*installable*](./nix.md#installables). This allows you to get a similar build
|
|
environment in your current shell rather than in a subshell (as with
|
|
`nix develop`).
|
|
|
|
With `--json`, the output is a JSON serialisation of the variables and
|
|
functions defined by the build process.
|
|
|
|
)""
|