config/profiles/http/docs/python-docs.nix

13 lines
473 B
Nix

{ config, pkgs, lib, ... }:
let
python-versions = lib.attrNames (lib.filterAttrs (k: v: lib.isDerivation v) pkgs.pythonDocs.html);
mkDocsEntry = python-version: {
dirname = "${python-version}";
path = "${builtins.toString pkgs.pythonDocs.html.${python-version}}/share/doc/${python-version}/html";
desc = "Documentation for Python ${pkgs.${python-version}.version}";
};
in
{
services.docs-to-host.docs = builtins.map mkDocsEntry python-versions;
}