blob: 17f3ea0bd8356ac8dcd659cd7af085a55764aa18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
---
tags:
- nix
---
It's easy to forget the basic building blocks of [[Nix]], because mostly time is spent configuring settings that make it feel like it's just some kind of JSON.
Then, what are those building blocks?
- Derivations
- Store derivation (.drv)
- Store
- The language
Derivation = Description of how to build a package, specifying its exact inputs. Following this recipe should result in exactly the same package no matter when we run it.
Derivation -> instantiate -> Store derivation. (`nix derivation show`)
### Flake
Armed with this knowledge it should be easier to recognize what a Flake actually is. We can specify inputs that we can use to build stuff which we specify in outputs.
The outputs thus have to be derivations. These can be tested as described in [[A nice way to test flake output]].
|