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

13 lines
473 B
Nix
Raw Permalink Normal View History

2023-02-26 03:53:55 +01:00
{ config, pkgs, lib, ... }:
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}";
};
in
{
2023-02-26 03:53:55 +01:00
services.docs-to-host.docs = builtins.map mkDocsEntry python-versions;
}