Everything that decides one package's pkgs/*.nix: the pin itself,
the set's compiler, the Rendering (the platform its conditionals are
resolved for and the Hackage index state its revision is read at), the
set-wide modifiers, the generator that renders them, and, for a local
package, its .cabal (which file, and its content): a Hackage, git or
tarball pin names its source exactly, a local one only by its
directory, whose .cabal can change under the same pin. A change to
any of these is a different derivation, so it must invalidate the
entry; the generator is among them so a release that renders
differently regenerates the sets it is run on.
Modulehorizon-config-shell-0.12.0GHC2024
Horizon.Config.Lock
The generator's change-detection cache — horizon.lock. NOT a lock
language and NOT the resolved source hashes (those live in the
generated pkgs/*.nix): it records, per package, a stable hash of
everything that decides that package's derivation, so a regeneration
only re-fetches the packages for which any of it changed (lockDiff).
Disposable tooling state — deleting it just forces a full regen.
The hash is sha256 of the Show encoding of a Pin (all its parts
derive Show; it is total and deterministic for these ADTs), and the
file is plain JSON (Map name hash). Changing what a Pin holds is a
one-time cache bust — the first run after it regenerates every
pkgs/*.nix, which is expected and harmless.
- 3 types
- 6 values
- Packagehorizon-config-shell-0.12.0
- Exports9
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceLock.hs
The pins to hash, one per package.
Constructors
The on-disk cache: package name → its pin hash.
Constructors
The pins of a set, given the .cabal of each local package.
The pins whose hash differs from the cache (or are new) — exactly the
pkgs/*.nix that must be regenerated.
Where the change-detection cache lives, relative to the config.
Read horizon.lock (JSON: name → hash); an absent file is an empty
cache (everything regenerates).
Write horizon.lock as JSON (name → hash), keys as plain text, ending
with a newline.