From 338136eb554c8e9daf413b8d5eecac51eebc924e Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Mon, 1 Jan 2024 16:47:02 +0100 Subject: [PATCH] add vendor about pdef --- .gitattributes | 1 + README.md | 38 +++++++++++++++++++++++--------------- pasta/src/eval.nix | 5 +++++ 3 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b9304d2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +pdefs.nix linguist-vendored \ No newline at end of file diff --git a/README.md b/README.md index 80fea63..ff124bb 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,6 @@ ![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) -![built-with-dream2nix](https://img.shields.io/badge/built%20with-dream2nix-blue) - -Connect with us on matrix: [#noogle:matrix.org](https://matrix.to/#/#noogle:matrix.org) ### Noogle is a Nix API search engine. It lets you search nix functions. @@ -13,29 +10,40 @@ Connect with us on matrix: [#noogle:matrix.org](https://matrix.to/#/#noogle:matr - [x] Beginners-friendly search for nix and nix-related functions - Render documentation comments optimized for readability - - We are working on a [standard]() for in-code-documentation -- [x] fuzzy-search. - - show why/what terms matched. - - Share results with a direct URL. +- [x] Filter by **type** signatures. + - Function types are parsed and interpreted. - [x] Noogle also knows stuff that is not officially documented. - 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] Search by **type** signatures. - - Function types are parsed and interpreted. - - We are working on a standard way to write type-documentation: [typednix.dev](https://typednix.dev) +- [x] Outputs Pre-rendered static html that is indexable by other search engines. +- [x] Wasm based performant instant search. ## Available data -There are the following subsets of nix functions available: +There are the following subsets of nix functions available. -- nix/**builtins** -- nixpkgs/**lib** -- nixpkgs/build-support/**trivial-builders** +Recursively Indexed: + +- lib +- pkgs.rustPackages + +Normally Indexed: + +- builtins +- pkgs.stdenv +- pkgs.dockerTools +- pkgs.writers +- pkgs.pythonPackages +- pkgs.haskell.lib +- pkgs.dockerTools ## Contribute -Contributions are very welcome to file a PR or issue. +Contributions are very welcome just file a PR or issue. +Indexed data can be added very easily in ./pasta/src/eval.nix + +> Note: Indexed data must evaluate! ### Build this page diff --git a/pasta/src/eval.nix b/pasta/src/eval.nix index 324ba39..f18670a 100644 --- a/pasta/src/eval.nix +++ b/pasta/src/eval.nix @@ -22,6 +22,8 @@ let # Contains seperate sets of metadata. # which then allows running seperate evaluations. Once at a time for better error tracing and memory management. + + docs = { ############# Recusive analysis sets lib = collectFns lib { initialPath = [ "lib" ]; }; @@ -42,6 +44,9 @@ let builtins = getDocsFromSet builtins [ "builtins" ]; }; + + + all = builtins.foldl' (acc: name: acc ++ docs.${name}) [ ] (builtins.attrNames docs); # generate test_data for pesto