2023-01-25 17:54:44 +03:00
|
|
|
# [Noogle](https://noogle.dev)
|
|
|
|
|
2023-01-16 12:41:07 +03:00
|
|
|
![Website](https://img.shields.io/website?down_message=noogle.dev&up_message=noogle.dev&url=https%3A%2F%2Fnoogle.dev)
|
|
|
|
![GitHub top language](https://img.shields.io/github/languages/top/hsjobeki/noogle)
|
|
|
|
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/hsjobeki/noogle/main.yml)
|
2023-06-18 19:03:24 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
### Noogle is a simple Nix API search engine. It lets you search Nix functions.
|
2022-11-26 12:36:08 +03:00
|
|
|
|
2023-01-25 17:54:44 +03:00
|
|
|
## Current Features
|
2022-11-26 12:36:08 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
- [x] Beginners-friendly search for Nix and Nix-related functions.
|
|
|
|
- Render documentation comments optimized for readability.
|
|
|
|
- Search optimized for English language and Nix function-names.
|
2024-01-01 18:47:02 +03:00
|
|
|
- [x] Filter by **type** signatures.
|
|
|
|
- Function types are parsed and interpreted.
|
2024-01-07 18:54:25 +03:00
|
|
|
- [x] Noogle also knows stuff that is not (yet) officially documented.
|
2024-09-19 12:31:45 +03:00
|
|
|
- Types of `builtins` (including `builtins.derivation`).
|
|
|
|
- Can be extended via markdown contributions to Noogle.
|
|
|
|
- Always shows the latest docs based on the main branch of Nixpkgs.
|
|
|
|
- [x] Outputs pre-rendered static HTML that is indexable by other search
|
|
|
|
engines.
|
2024-01-07 18:54:25 +03:00
|
|
|
- [x] Wasm based performant search.
|
2022-11-26 12:36:08 +03:00
|
|
|
|
2023-01-25 17:54:44 +03:00
|
|
|
## Available data
|
2022-12-18 16:21:00 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
There are the following subsets of Nix and Nixpkgs functions available.
|
2024-01-01 18:47:02 +03:00
|
|
|
|
2024-01-03 16:13:21 +03:00
|
|
|
Recursively indexed:
|
2022-12-18 16:21:00 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
- `lib`
|
|
|
|
- `pkgs.rustPackages`
|
2024-01-01 18:47:02 +03:00
|
|
|
|
2024-01-03 16:13:21 +03:00
|
|
|
> Recursively means all deeply nested sub-attributes.
|
|
|
|
|
|
|
|
Normally indexed:
|
2024-01-01 18:47:02 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
- `builtins`
|
|
|
|
- `pkgs.stdenv`
|
|
|
|
- `pkgs.dockerTools`
|
|
|
|
- `pkgs.writers`
|
|
|
|
- `pkgs.pythonPackages`
|
|
|
|
- `pkgs.haskell.lib`
|
|
|
|
- `pkgs.haskell.lib`
|
2024-01-03 16:13:21 +03:00
|
|
|
|
|
|
|
# Off the tree functions
|
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
Some function are not part of the evaluation value of `default.nix` in Nixpkgs.
|
|
|
|
They must be imported individually.
|
2024-01-03 16:13:21 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
- `make-disk-image`
|
2024-01-03 16:13:21 +03:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
All Indexing is done via the [pasta](./pasta/) module. PRs welcome!
|
2022-12-18 16:21:00 +03:00
|
|
|
|
2022-12-06 12:58:48 +03:00
|
|
|
## Contribute
|
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
Contributions are very welcome just file a PR or issue. Indexed data can be
|
|
|
|
added very easily in `./pasta/src/eval.nix`.
|
2024-01-01 18:47:02 +03:00
|
|
|
|
|
|
|
> Note: Indexed data must evaluate!
|
2022-11-26 12:36:08 +03:00
|
|
|
|
2022-11-26 12:51:42 +03:00
|
|
|
### Build this page
|
2022-11-26 12:36:08 +03:00
|
|
|
|
2024-01-03 16:13:21 +03:00
|
|
|
`nix build .#ui`
|
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
This page generates static HTML pages. One page per API function.
|
2024-01-03 16:13:21 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
It automatically includes meta tags for other search engines like Google or
|
|
|
|
Bing.
|
2024-01-03 16:13:21 +03:00
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
Searching within the page is done via [pagefind](https://pagefind.app/) which is
|
|
|
|
only available in the production build.
|
2022-11-26 12:36:08 +03:00
|
|
|
|
2022-11-26 12:51:42 +03:00
|
|
|
### Develop
|
2022-11-26 12:36:08 +03:00
|
|
|
|
|
|
|
`nix develop`
|
|
|
|
|
2024-09-19 12:31:45 +03:00
|
|
|
This command creates the `node_modules` directory with all needed dependencies
|
|
|
|
based on `dream2nix`.
|