about summary refs log tree commit diff
path: root/nix/renderMarkdown/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-10-16T14·30+0200
committertazjin <mail@tazj.in>2021-10-19T11·47+0000
commitedd8680e8773e4568d3d645c53932cf75ebf09fa (patch)
tree2dc65e920ca528c3691ee959656ee847a10512fe /nix/renderMarkdown/default.nix
parent7bde7ca9958866015e812478170dfbc770eb30e0 (diff)
chore(nix/renderMarkdown): Move out of //users/tazjin r/2975
Change-Id: Ia5e873420b57436abead8e02cef3e5b7149de123
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3731
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'nix/renderMarkdown/default.nix')
-rw-r--r--nix/renderMarkdown/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nix/renderMarkdown/default.nix b/nix/renderMarkdown/default.nix
new file mode 100644
index 000000000000..3e5a59954b20
--- /dev/null
+++ b/nix/renderMarkdown/default.nix
@@ -0,0 +1,8 @@
+# Render a Markdown file to HTML.
+{ depot, pkgs, ... }:
+
+with depot.nix.yants;
+
+defun [ path drv ] (file: pkgs.runCommandNoCC "${file}.rendered.html" {} ''
+  cat ${file} | ${depot.tools.cheddar}/bin/cheddar --about-filter ${file} > $out
+'')