-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
@@ -1,6 +1,6 @@ | |||
{ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with [nixpkgs]$ nix-build ./doc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
doc
expressions take both apkgs
packageset as well as anixpkgs
argument whose purpose is unclear.I traced all the usage of
nixpkgs
and it appears to be simply "any attrset with arevision
attribute". Let's replace this argument withnixpkgs-revision
so people know what its purpose is.I did not change the arguments to
doc/default.nix
because it mightbe considered an exposed public interface (does Hydra
nix-instantiate
it directly?). We should give it an entry inall-packages.nix and access it that way.