refactor: use runCommandLocal for parseMarkdown / site path drvs

This commit is contained in:
dusk 2022-02-17 01:35:47 +03:00
parent 6291c23a68
commit 18fa28319f
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -18,13 +18,13 @@ let
mkCreateFileCmd = path: value: let p = concatStringsSep "/" (init path); in "mkdir -p \"$out/${p}\" && ln -s \"${value}\" \"$out/${p}/${last path}\"";
createFileCmds = map (path: mkCreateFileCmd path (getAttrFromPath path texts)) fileAttrPaths;
in
pkgs.runCommand "site-path" { } ''
pkgs.runCommandLocal "site-path" { } ''
mkdir -p $out
${concatStringsSep "\n" createFileCmds}
'';
parseMarkdown = name: contents:
pkgs.runCommand name { } ''
pkgs.runCommandLocal name { } ''
printf ${pkgs.lib.escapeShellArg contents} | ${pkgBin "pandoc"} -f gfm > $out
'';
in