mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-20 18:50:50 +00:00
31 lines
773 B
Plaintext
31 lines
773 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# nix-instantiate
|
|
|
|
> Create store derivations from nix expressions.
|
|
> See also: `nix eval`.
|
|
> More information: <https://nix.dev/manual/nix/latest/command-ref/nix-instantiate.html>.
|
|
|
|
- Instantiate a store derivation from a Nix file:
|
|
|
|
`nix-instantiate {{path/to/file.nix}}`
|
|
|
|
- Evaluate an expression:
|
|
|
|
`nix-instantiate --eval {{[-E|--expr]}} {{expression}}`
|
|
|
|
- Evaluate with machine readable output:
|
|
|
|
`nix-instantiate --eval --xml {{[-E|--expr]}} {{expression}}`
|
|
|
|
- Raw output, output of the function must be a string:
|
|
|
|
`nix-instantiate --eval --raw {{[-E|--expr]}} {{expression}}`
|
|
|
|
- Evaluate a Nix expression from a specified file:
|
|
|
|
`nix-instantiate --eval {{path/to/file.nix}}`
|