refactor: use runCommandLocal for parseMarkdown / site path drvs
This commit is contained in:
parent
6291c23a68
commit
18fa28319f
@ -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}\"";
|
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;
|
createFileCmds = map (path: mkCreateFileCmd path (getAttrFromPath path texts)) fileAttrPaths;
|
||||||
in
|
in
|
||||||
pkgs.runCommand "site-path" { } ''
|
pkgs.runCommandLocal "site-path" { } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
${concatStringsSep "\n" createFileCmds}
|
${concatStringsSep "\n" createFileCmds}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
parseMarkdown = name: contents:
|
parseMarkdown = name: contents:
|
||||||
pkgs.runCommand name { } ''
|
pkgs.runCommandLocal name { } ''
|
||||||
printf ${pkgs.lib.escapeShellArg contents} | ${pkgBin "pandoc"} -f gfm > $out
|
printf ${pkgs.lib.escapeShellArg contents} | ${pkgBin "pandoc"} -f gfm > $out
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user