FAQ/Pinning Nixpkgs

From NixOS Wiki
Revision as of 16:24, 11 January 2018 by imported>Grahamc (First load, testing newlines.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

It is possible (and indeed, fairly easy) to pin a specific version of Nixpkgs. This can be used to upgrade individual applications separately on their own terms, and to ensure their deployability is not impacted by other systems' requirements.

For example, the following code uses the host's Nixpkgs as a springboard to fetch and import a specific, pinned version of Nixpkgs. This is safe because the specific code we're using from the variable host Nixpkgs is using a very stable API, and will be thrown away as soon as we are done importing the pinned version of Nixpkgs.