nixpkgs/doc/doc-support
Philip Taron 587f64a264
nixpkgs-manual: use injected revision only
`lib.trivial.revisionWithDefault` will change with every Git commit, which causes the manual to be rebuilt on every since PR.

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?

1. https://hydra.nixos.org/jobset/nixos/trunk-combined#tabs-configuration shows that `pkgs/top-level/release.nix` is passed the `nixpkgs` attrset, which is a "Git checkout".
2. Git checkouts come from [`builtins.fetchGit`](https://nix.dev/manual/nix/2.18/language/builtins#builtins-fetchGit) and include the `rev` attribute.
3. The `rev` attribute is what `lib.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.
2024-07-29 11:29:15 -07:00
..
epub.nix nixpkgs-manual: init 2024-07-26 13:46:12 -07:00
lib-function-docs.nix nixpkgs-manual: init 2024-07-26 13:46:12 -07:00
lib-function-locations.nix
options-doc.nix nixpkgs-manual: init 2024-07-26 13:46:12 -07:00
package.nix nixpkgs-manual: use injected revision only 2024-07-29 11:29:15 -07:00
python-interpreter-table.nix nixpkgs-manual: init 2024-07-26 13:46:12 -07:00