Exposing Nix capabilities to the command-line
Channel: Tweag
Date: 2022-06-23

This is the fourth episode of the builtins.randomStorePath series, in which we implement a new Nix builtin as an excuse to dive into the codebase and discover how things work internally.

In this video, we take the – now working – implementation of the builtin, and make it directly available from the Nix cli as a new subcommand: `nix store random-path`.
Rough plan:

- Intro (00:00)
- Recap of the last episodes (01:33)
- Exploring the main() function (03:00)
- Implementing of the new subcommand (08:20)
- Digressing on the logging system (21:05)
- Polishing the command (35:19)
- Showing the shiny docs (41:15)