Support literalExpression and literalDocBook (#368)
* Support literalExpression and literalDocBook * Use consistent nixpkgs versions in get_nixpkgs_options
This commit is contained in:
parent
9e018c36da
commit
b74147b671
|
@ -82,7 +82,8 @@ let
|
||||||
|
|
||||||
# Replace functions by the string <function>
|
# Replace functions by the string <function>
|
||||||
substFunction = x:
|
substFunction = x:
|
||||||
if x ? _type && x._type == "literalExample" then x.text
|
if x ? _type && (x._type == "literalExample" || x._type == "literalExpression" || x._type == "literalDocBook") then
|
||||||
|
x.text
|
||||||
else if builtins.isAttrs x then
|
else if builtins.isAttrs x then
|
||||||
lib.mapAttrs (name: substFunction) x
|
lib.mapAttrs (name: substFunction) x
|
||||||
else if builtins.isList x then
|
else if builtins.isList x then
|
||||||
|
|
|
@ -64,6 +64,8 @@ pub fn get_nixpkgs_options<T: AsRef<str> + Display>(
|
||||||
"--json",
|
"--json",
|
||||||
"-f",
|
"-f",
|
||||||
script_path.to_str().unwrap(),
|
script_path.to_str().unwrap(),
|
||||||
|
"-I",
|
||||||
|
format!("nixpkgs={}", nixpkgs_channel.as_ref()).as_str(),
|
||||||
"--arg",
|
"--arg",
|
||||||
"flake",
|
"flake",
|
||||||
nixpkgs_channel.as_ref(),
|
nixpkgs_channel.as_ref(),
|
||||||
|
|
Loading…
Reference in a new issue