A content addressable store for Nix with Théophane Hufschmitt
Compositional - En podcast af Tweag I/O
Kategorier:
In this episode, Rok Garbas interviews Théophane Hufschmitt who is implementing a content addressed storage for Nix. Théophane explains why this feature is so useful to have for build systems and why he started working on it. He also gives a glimpse into what working with the core Nix C++ codebase feels like. Nix packages are usually addressed by the hashes of all build inputs from which they are derived and not by their content, the build output. This makes a lot of sense for a package manager because we can identify and retrieve a package precisely by the sources, build instructions and dependencies that it corresponds to. However, there are situations where it is advantageous to access a package by content. For example, to avoid unnecessary recomputations when packages produce the same build outputs even when their build inputs vary - a feature called early cutoff. More information in the links below!Special Guest: Théophane Hufschmitt.Links:Tweag blog: Towards a content-addressed model for Nix — A brief overview and introduction of the why and how of the content addressable store in Nix.Tweag blog: Self-references in content-addressed Nix — This post goes into details why the combination of a build input addressed store with a content addressed store is not as easy as it seems.The original RFC that proposes to implement a CAS for Nix — New Nix features are proposed in a RFC (request for comments) document on GitHub and then reviewed. This is the original proposition for implementing a content addressable store with the associated discussion.Build Systems à la Carte — This research paper gives an overview of a variety of build system the features they support. The ability to "early cutoff" computations when certain output targets already exist will be unlocked by the content addressable store in Nix.An introduction to content addressable storage — This article gives a short introduction to content addressable storage using the example of IPFS which is also referred to in this episode.The section in the original Nix PhD thesis that already proposes a content addressed store model — This so-called intensional store model aims to make guarantees about internal properties of software packages model such as file content. This is opposed to the common extensional model in Nix that aims to only make guarantees about relevant external properties.