Difference between `fetchgit` and `fetchGit`

I find it helpful to think of the nix client and nix daemon to be separate things.

  1. The nix client is responsible for evaluating the nix expression language and produces build recipes (.drv files) and fixed-output files. The fixed-output files are when file paths are being used for example. Or any of the builtins.fetch* methods. It then talks to the nix daemon to add those to the store and build them.

  2. The nix daemon is responsible for the whole /nix folder. It has a RPC protocol to receive fixed-output files and .drv files. It can be asked to build derivations… Some of those derivations have a determined fixed output and are also implemented as fetchers.

Even in single-user mode, the nix client and daemon are just in the same process.

4 Likes