diff --git a/apps/gen-docs/default.nix b/apps/gen-docs/default.nix index 5877a31d..f0d095ac 100644 --- a/apps/gen-docs/default.nix +++ b/apps/gen-docs/default.nix @@ -1,10 +1,11 @@ { writeShellApplication, + jq, pandoc, ... }: writeShellApplication { name = "gen-docs"; - runtimeInputs = [pandoc]; + runtimeInputs = [jq pandoc]; text = builtins.readFile ./script.sh; } diff --git a/apps/gen-docs/script.sh b/apps/gen-docs/script.sh index 0d2af308..48018425 100755 --- a/apps/gen-docs/script.sh +++ b/apps/gen-docs/script.sh @@ -1,9 +1,9 @@ packageMetaFunc=$(cat << EOF (x: { attrs = builtins.mapAttrs (_: v: { - desc = v.meta.description or ""; + desc = builtins.replaceStrings ["\n"] [""] (v.meta.description or ""); homepage = v.meta.homepage or ""; - }) x.\${builtins.currentSystem}; + }) (builtins.removeAttrs x.\${builtins.currentSystem} ["default"]); }) EOF ) diff --git a/apps/gen-docs/templates/devShells.md b/apps/gen-docs/templates/devShells.md index 3fd71fa7..e608570a 100644 --- a/apps/gen-docs/templates/devShells.md +++ b/apps/gen-docs/templates/devShells.md @@ -7,5 +7,5 @@ This directory contains every derivations for devShells exposed by this flake. | Name | Description | | ---- | ----------- | $for(attrs/pairs)$ -| $it.key$ | $it.value.desc$ | +| $it.key$ | $it.value.desc/nowrap$ | $endfor$