{ depot, lib, pkgs, ... }: let inherit (depot.nix) getBins runExecline yants ; inherit (depot.tools) cheddar ; inherit (pkgs) mandoc coreutils fetchurl writers ; bins = getBins cheddar [ "cheddar" ] // getBins mandoc [ "mandoc" ] // getBins coreutils [ "cat" "mv" "mkdir" ] ; normalizeDrv = fetchurl { url = "https://necolas.github.io/normalize.css/8.0.1/normalize.css"; sha256 = "04jmvybwh2ks4dlnfa70sb3a3z3ig4cv0ya9rizjvm140xq1h22q"; }; execlineStdoutInto = target: line: [ "redirfd" "-w" "1" target ] ++ line; # I will not write a pure nix markdown renderer # I will not write a pure nix markdown renderer # I will not write a pure nix markdown renderer # I will not write a pure nix markdown renderer # I will not write a pure nix markdown renderer markdown = md: let html = runExecline.local "rendered-markdown" { stdin = md; } ([ "importas" "-iu" "out" "out" ] ++ execlineStdoutInto "$out" [ bins.cheddar "--about-filter" "description.md" ]); in builtins.readFile html; indexTemplate = { title, description, pages ? [] }: ''