From b74147b6716ece420840ea3dd200a176d944244b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 15 Oct 2021 10:20:18 +0200 Subject: [PATCH] Support literalExpression and literalDocBook (#368) * Support literalExpression and literalDocBook * Use consistent nixpkgs versions in get_nixpkgs_options --- flake-info/src/commands/flake_info.nix | 3 ++- flake-info/src/commands/nixpkgs_info.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/flake-info/src/commands/flake_info.nix b/flake-info/src/commands/flake_info.nix index 520553b..76db6d3 100644 --- a/flake-info/src/commands/flake_info.nix +++ b/flake-info/src/commands/flake_info.nix @@ -82,7 +82,8 @@ let # Replace functions by the string 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 diff --git a/flake-info/src/commands/nixpkgs_info.rs b/flake-info/src/commands/nixpkgs_info.rs index f544688..09069ae 100644 --- a/flake-info/src/commands/nixpkgs_info.rs +++ b/flake-info/src/commands/nixpkgs_info.rs @@ -64,6 +64,8 @@ pub fn get_nixpkgs_options + Display>( "--json", "-f", script_path.to_str().unwrap(), + "-I", + format!("nixpkgs={}", nixpkgs_channel.as_ref()).as_str(), "--arg", "flake", nixpkgs_channel.as_ref(),