Skip to content

Commit

Permalink
Merge pull request #578 from SuperSandro2000/patch-1
Browse files Browse the repository at this point in the history
lib: cleanup from fromYAML
  • Loading branch information
DavHau committed Dec 5, 2023
2 parents d6ae81d + cd80f43 commit 98781c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mach_nix/nix/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 98781c6

Please sign in to comment.