nixpkgs-manual: use injected revision only #330915
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for change
nixpkgs-manual
is listed as a rebuild on every single PR since I introduced it to the top-level packages in #311459.Description of change
The existing derivation used
lib.trivial.revisionWithDefault
in its build phase. Due to that, the derivation will change with every Git commit, which then causes the manual to be rebuilt on every single PR or commit.Using
nixpkgs.rev
(or the dummy value "master" if it's not present) means that the manual will contain the revision if built on Hydra, but will not otherwise.Why?
pkgs/top-level/release.nix
is passed thenixpkgs
attrset, which is a "Git checkout".builtins.fetchGit
and include therev
attribute.rev
attribute is whatlib.trivial.revisionWithDefault
would have returned.So, using
nixpkgs.rev or "master"
exclusively will cause the rebuilds on every commit to cease, but will allow "official" nixpkgs manual built on Hydra to continue to reference a specific commit.The line this PR replaces was introduced in be4d19f by @pennae (#239636).
nixpkgs/doc/default.nix
Line 80 in be4d19f
Things done