From cd80f431f853e5de865f61473a2da9cdf0763604 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 2 Dec 2023 21:53:32 +0100 Subject: [PATCH] lib: cleanup from fromYAML --- mach_nix/nix/lib.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mach_nix/nix/lib.nix b/mach_nix/nix/lib.nix index 7b88253..a29a789 100644 --- a/mach_nix/nix/lib.nix +++ b/mach_nix/nix/lib.nix @@ -18,7 +18,7 @@ rec { mergeOverrides = foldl composeExtensions (self: super: { }); fromYAML = str: - fromJSON (readFile (pkgs.runCommand "yml" { buildInputs = [pkgs.yq pkgs.jq] ;} ''echo '${escape ["'"] str}' | ${pkgs.yq}/bin/yq . > $out'')); + importJSON (pkgs.runCommand "yml" { nativeBuildInputs = [pkgs.yq] ;} ''echo '${escape ["'"] str}' | yq . > $out''); isCondaEnvironmentYml = str: hasInfix "\nchannels:\n" str && hasInfix "\ndependencies:\n" str;