2023-02-26 03:53:55 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-02-26 02:46:35 +01:00
|
|
|
let
|
2023-02-26 03:53:55 +01:00
|
|
|
python-versions = lib.attrNames (lib.filterAttrs (k: v: lib.isDerivation v) pkgs.pythonDocs.html);
|
|
|
|
mkDocsEntry = python-version: {
|
2023-02-26 06:11:55 +01:00
|
|
|
dirname = "${python-version}";
|
|
|
|
path = "${builtins.toString pkgs.pythonDocs.html.${python-version}}/share/doc/${python-version}/html";
|
|
|
|
desc = "Documentation for Python ${pkgs.${python-version}.version}";
|
2023-02-26 02:46:35 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2023-02-26 03:53:55 +01:00
|
|
|
services.docs-to-host.docs = builtins.map mkDocsEntry python-versions;
|
2023-02-26 02:46:35 +01:00
|
|
|
}
|