diff options
Diffstat (limited to 'Basic building blocks of Nix.md')
-rw-r--r-- | Basic building blocks of Nix.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Basic building blocks of Nix.md b/Basic building blocks of Nix.md new file mode 100644 index 0000000..17f3ea0 --- /dev/null +++ b/Basic building blocks of Nix.md @@ -0,0 +1,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]].
\ No newline at end of file |