From 76bd73b24e3d05606048c0ec463f5d577c33836f Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 2 Jun 2019 01:53:02 -0300 Subject: Build README.org HTML in utils.nix --- utils.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'utils.nix') diff --git a/utils.nix b/utils.nix index 805f38a..4c180d8 100644 --- a/utils.nix +++ b/utils.nix @@ -65,21 +65,12 @@ in rec { url = https://euandre.org/dotfiles/static/README.css; sha256 = "1c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"; }; - orgMkDocs = title: + readmeOrg = title: baseTask.overrideAttrs (baseAttrs: { - name = "${baseAttrs.name}-docs"; - buildInputs = [ pkgs.pandoc pkgs.mkdocs ]; + name = "${baseAttrs.name}-readme-docs"; + buildInputs = [ pkgs.pandoc ]; buildPhase = '' - # Convert from org-mode to markdown with pandoc - find docs/ -type f -name '*.org' -print0 | xargs -0 -I{} pandoc -o {}.md {}.org - - # Give the generated markdown files to MkDocs - mkdocs build - - # Build remaining one-off files - pandoc README.org -o site/index.html --css ${readmeCss} --to=html5 --self-contained --metadata title="${title}" - - mv site/ $out/ + pandoc README.org -o $out --css ${readmeCss} --to=html5 --self-contained --metadata title="${title}" ''; }); test = testDerivations: -- cgit v1.2.3