doc: pass nixpkgs-revision instead of nixpkgs#226061
Conversation
The `doc` expressions take both a `pkgs` packageset as well as a `nixpkgs` argument whose purpose is unclear. I traced all the usage of `nixpkgs` and it appears to be simply "any attrset with a `revision` attribute". Let's replace this argument with `nixpkgs-revision` so people know what its purpose is. I did not change the arguments to `doc/default.nix` because it might be considered an exposed public interface (does Hydra `nix-instantiate` it directly?). We should give it an entry in all-packages.nix and access it that way.
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tweag-nix-dev-update-47/27387/1 |
|
is this even necessary after #226057? looks like both achieve the same thing. |
| { pkgs ? (import ./.. { }), nixpkgs ? { }}: | ||
| let | ||
| doc-support = import ./doc-support { inherit pkgs nixpkgs; }; | ||
| doc-support = import ./doc-support { inherit pkgs; nixpkgs-revision = nixpkgs.revision; }; |
There was a problem hiding this comment.
Does this work with [nixpkgs]$ nix-build ./doc?
There was a problem hiding this comment.
No, it doesn't.
I guess there's some ambiguity about what are valid entry points into nixpkgs. Maybe this should wait until that question gets answered.
|
Keeping |
That was sort of the idea. I wanted to make the manual callable from situations where you really shouldn't assume the ability to It turned out that the docs don't use that argument for anything except the revision, so the idea was to pass only that. |
The
docexpressions take both apkgspackageset as well as anixpkgsargument whose purpose is unclear.I traced all the usage of
nixpkgsand it appears to be simply "any attrset with arevisionattribute". Let's replace this argument withnixpkgs-revisionso people know what its purpose is.I did not change the arguments to
doc/default.nixbecause it mightbe considered an exposed public interface (does Hydra
nix-instantiateit directly?). We should give it an entry inall-packages.nix and access it that way.