Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/default.nix
Original file line number Diff line number Diff line change
@@ -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; };
Copy link
Member

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?

Copy link
Author

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.

in pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";

Expand Down
4 changes: 2 additions & 2 deletions doc/doc-support/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? (import ../.. {}), nixpkgs ? { }}:
{ pkgs ? (import ../.. {}), nixpkgs-revision }:
let
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
Expand All @@ -18,7 +18,7 @@ let
{ name = "cli"; description = "command-line serialization functions"; }
];

locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; };
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs-revision libsets; };
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs libsets; };
version = pkgs.lib.version;

Expand Down
4 changes: 2 additions & 2 deletions doc/doc-support/lib-function-locations.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs, nixpkgs ? { }, libsets }:
{ pkgs, nixpkgs-revision ? "master", libsets }:
let
revision = pkgs.lib.trivial.revisionWithDefault (nixpkgs.revision or "master");
revision = pkgs.lib.trivial.revisionWithDefault nixpkgs-revision;

libDefPos = prefix: set:
builtins.concatMap
Expand Down