{"id":14968006,"url":"https://github.com/nix-community/docnix","last_synced_at":"2025-10-26T00:30:46.728Z","repository":{"id":194254615,"uuid":"690422778","full_name":"nix-community/docnix","owner":"nix-community","description":"nix-community reference documentation (until officially released) [maintainer=@hsjobeki]","archived":true,"fork":false,"pushed_at":"2024-06-29T02:46:34.000Z","size":1480,"stargazers_count":25,"open_issues_count":9,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T14:38:26.621Z","etag":null,"topics":["documentation","nix","nixos","nixpkgs","references","toolset"],"latest_commit_sha":null,"homepage":"https://nix-community.github.io/docnix/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nix-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"nix-community"}},"created_at":"2023-09-12T07:02:14.000Z","updated_at":"2024-08-22T00:00:47.000Z","dependencies_parsed_at":"2023-10-31T09:31:08.263Z","dependency_job_id":"34a4f76e-eb59-462d-9a27-eaa5d62fac3b","html_url":"https://github.com/nix-community/docnix","commit_stats":{"total_commits":66,"total_committers":4,"mean_commits":16.5,"dds":"0.045454545454545414","last_synced_commit":"7758af4e0c3a8dc754a157c664c5b2f86c0a570e"},"previous_names":["hsjobeki/nix-doc-comments","nix-community/docnix"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fdocnix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fdocnix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fdocnix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fdocnix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nix-community","download_url":"https://codeload.github.com/nix-community/docnix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238024489,"owners_count":19403851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","nix","nixos","nixpkgs","references","toolset"],"created_at":"2024-09-24T13:39:05.809Z","updated_at":"2025-10-26T00:30:46.346Z","avatar_url":"https://github.com/nix-community.png","language":"Rust","funding_links":["https://opencollective.com/nix-community"],"categories":[],"sub_categories":[],"readme":"# Docnix\n\nFinally, complete autogenerated documentation for the whole nix-ecosystem.\n\n## [View here](https://nix-community.github.io/docnix/)\n\n## 🚧🚧🚧 Under Construction 🚧🚧🚧\n\n## Content\n\nAutogenerated documentation from source code including\n\n- `lib.*`\n- `pkgs.*`\n  - `pkgs.stdenv.*`\n- `builtins.*`\n\n## How it works\n\n0. Preparation\n\nFor this to work properly we need doc-comments in format according to RFC-145.\nSince nixpkgs is not entirely written in this format we use our package *codemod* to automatically migrate all comments.\n\n`Nixpkgs -\u003e Nixpkgs'`\n\n1. Data extraction\n\nThe next step is calling our custom `builtins` `unsafeGetAttrDoc` and `unsafeGetLambdaDoc` to retrieve the documentation for all functions in the nixpkgs expression tree.\n\n`Nixpkgs' -\u003e json`\n\n2. Data separation / aggregation\n\nData is scanned, and additional information from positions, partially applied aliases, etc. is collected and dumped into separate markdown files.\nEvery markdown file also includes a short `yaml` header needed by the rendering framework.\n\nIt contains information about the navigation, tags, headlines and other meta information.\n\n`Json -\u003e Markdown`\n\n3. Rendering\n\nWe then utilize a simple javascript rendering framework to transform all the scraped data into separate markdown / html pages.\n\nA search index and sitemap.xml is built for page search as well as for external search engines like Google.\n\n`Markdown -\u003e Static html`\n\nEt voila 🥳\n\n## Contributing / Remaining work\n\nAll contributions are welcome! ❤️\n\n- We still need the RFC-145 to be accepted. 👍\n- review all the nixpkgs doc-comments changes. 👀\n  - This draft [PR#262987](https://github.com/NixOS/nixpkgs/pull/262987) should be split into multiple PRs, reviewed manually and merged. 🔪\n- Change the current nixpkgs manual rendering as it will break when using plain markdown in nixpkgs comments. 😱\n- Clarify rendering rules / best practices ☝️\n  - for aliased functions.\n  - for builtins\n- Writing more doc-comments  ⌨ ✍️\n  - `lib.` `types` and `options` are almost completely undocumented\n  - `pkgs.stdenv` is missing some documented functions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fdocnix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnix-community%2Fdocnix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fdocnix/lists"}