Store path
-
Nix Store
The directory used by Nix to store store paths (including derivations).
-
First steps with Nix
From here, you can verify that both the programs are indeed in
$PATH
as indicated by the “bin” directory in their respective store paths:Note that this is the same path used by both
nix build
andnix shell
. Each specific package is uniquely identified by their Store path; changing any part of its build recipe (including dependencies), changes that path. Hence, nix is reproducible.These symlinks, ultimately, point to the package Store path outputs under the Nix Store, viz.:
What is a Nix “package”? Technically, a Nix package is a special Store path built using instructions from a Derivation, both of which reside in the Nix Store. To see what is contained by the
cowsay
package, look inside its Store path. To get the store path for a package (here,cowsay
), runnix build
as follows:[!info] Nix Store & Store Paths
/nix/store
is a special directory representing the Nix Store. The paths inside/nix/store
are known as Store path. Nix fundamentally is, in large part, about manipulating these store paths in a pure and reproducible fashion; Derivation are “recipes” that does this manipulation, and they too live in the Nix Store.