Support literalExpression and literalDocBook (#368)

* Support literalExpression and literalDocBook

* Use consistent nixpkgs versions in get_nixpkgs_options
This commit is contained in:
Naïm Favier 2021-10-15 10:20:18 +02:00 committed by GitHub
parent 9e018c36da
commit b74147b671
Failed to generate hash of commit
2 changed files with 4 additions and 1 deletions

View file

@ -82,7 +82,8 @@ let
# Replace functions by the string <function>
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
lib.mapAttrs (name: substFunction) x
else if builtins.isList x then

View file

@ -64,6 +64,8 @@ pub fn get_nixpkgs_options<T: AsRef<str> + Display>(
"--json",
"-f",
script_path.to_str().unwrap(),
"-I",
format!("nixpkgs={}", nixpkgs_channel.as_ref()).as_str(),
"--arg",
"flake",
nixpkgs_channel.as_ref(),