Home Explore Blog CI



nix

2nd chunk of `doc/manual/source/language/import-from-derivation.md`
3f7275b0bb813c059a483ec1967ec0624dd6bac46872533c0000000100000928
| Nix evaluator        |             | Nix store              |
|  .----------------.  |             |                        |
|  | Nix expression |  |             |                        |
|  '----------------'  |             |                        |
|          |           |             |                        |
|       evaluate       |             |                        |
|          |           |             |                        |
|          V           |             |                        |
|    .------------.    |             |                        |
|    | derivation |    |             |  .------------------.  |
|    | expression |----|-instantiate-|->| store derivation |  |
|    '------------'    |             |  '------------------'  |
|                      |             |           |            |
|                      |             |        realise         |
|                      |             |           |            |
|                      |             |           V            |
|  .----------------.  |             |    .--------------.    |
|  | Nix expression |<-|----read-----|----| store object |    |
|  '----------------'  |             |    '--------------'    |
|          |           |             |                        |
|       evaluate       |             |                        |
|          |           |             |                        |
|          V           |             |                        |
|    .------------.    |             |                        |
|    |   value    |    |             |                        |
|    '------------'    |             |                        |
+----------------------+             +------------------------+
```

In more detail, the following sequence diagram shows how the expression is evaluated step by step, and where evaluation is blocked to wait for the build output to appear.

```
.-------.     .-------------.                        .---------.
|Nix CLI|     |Nix evaluator|                        |Nix store|
'-------'     '-------------'                        '---------'
    |                |                                    |
    |evaluate IFD.nix|                                    |
    |--------------->|                                    |
    |                |                                    |

Title: Detailed IFD Illustration with Data Flow and Sequence Diagrams
Summary
This section presents a detailed illustration of the Import From Derivation (IFD) process using a data flow diagram and a sequence diagram. The data flow diagram visually represents how the Nix evaluator interacts with the Nix store to evaluate a derivation expression, instantiate it into a store derivation, realize the store object, and read its contents back into the evaluator. The sequence diagram then shows the step-by-step evaluation process and highlights where the evaluation is blocked, waiting for the build output to become available.