docs: take defaults from environment variables
When building with --impure, accept the following environment variables
for docs inputs:
- NIXVIM_DOCS_BASE_HREF → baseHref
- NIXVIM_DOCS_AVAILABLE_VERSIONS → availableVersions
This allows simplifying the `website` CI workflow.
(cherry picked from commit 70886b715e)
This commit is contained in:
parent
8f43a6766e
commit
68e314303b
1 changed files with 3 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# NOTE: to use defaults from the environment, you must build with --impure
|
||||
{
|
||||
pkgs,
|
||||
callPackage,
|
||||
|
|
@ -9,10 +10,10 @@
|
|||
search,
|
||||
lib-docs,
|
||||
# The root directory of the site
|
||||
baseHref ? "/",
|
||||
baseHref ? lib.maybeEnv "NIXVIM_DOCS_BASE_HREF" "/",
|
||||
# A list of all available docs that should be linked to
|
||||
# Each element should contain { branch; nixpkgsBranch; baseHref; status; }
|
||||
availableVersions ? [ ],
|
||||
availableVersions ? builtins.fromJSON (lib.maybeEnv "NIXVIM_DOCS_AVAILABLE_VERSIONS" "[]"),
|
||||
}:
|
||||
let
|
||||
inherit (configuration.config.meta) nixvimInfo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue