Noogle: Difference between revisions

Noogle.dev - nix function exploring
 
Lukec (talk | contribs)
m Fix grammar and slight rewording for clarity
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Noogle =
= Noogle =


Noogle is a community maintained search page designed specifically for NixOS users and maintainers. It knows about all standard nix functions. Which are typically used via <code>builtins</code>, <code>lib</code> and the <code>pkgs</code> attributes.
[https://noogle.dev Noogle] is a community maintained search page designed specifically for NixOS users and maintainers. It knows about all standard nix functions which are typically used via the <code>builtins</code>, <code>lib</code> and <code>pkgs</code> attributes.
 
Noogle.dev is especially useful when:
 
* you are looking for a function doing a certain transformation. For example: [https://noogle.dev/q?from=list&to=attrset List -> AttributeSet] [https://noogle.dev/q?from=list&to=string List -> String] [https://noogle.dev/q?from=attrset&to=list AttributeSet -> List]
 
* quick companion for looking up how to use a certain function.
* fuzzy searching within all the functions
* finding the source position of functions


== Discoverability ==
== Discoverability ==


The indexing of functions is done via tree-traversal of the nix attribute sets.
Functions are indexed via tree-traversal of the nix attribute sets.
Nix's position tracking is used in conjunction with static analysis based on the rnix AST to backtrace each function to its declaration in the source code.
Nix's position tracking is used in conjunction with static analysis based on the rnix AST to backtrace each function to its declaration in the source code.


Line 16: Line 24:
Noogle uses internal function characteristics and properties of the nix evaluator to detect aliases.
Noogle uses internal function characteristics and properties of the nix evaluator to detect aliases.


For example: <code>lib.lists.concatLists</code> is the same as calling <code>lib.concatLists</code> or <code> builtins.concatLists</code>  
For example: <code>lib.lists.concatLists</code> is the same as calling <code>lib.concatLists</code> or <code>builtins.concatLists</code>  


== Updates ==
== Updates ==


Noogle is updated daily against the master branch of nix (builtins) and nixpkgs (lib,pkgs,...)
Noogle is updated daily against the master branch of nix (builtins) and nixpkgs (lib, pkgs,...)


== API ==
== API ==
Line 33: Line 41:


Download the dataset at: http://noogle.dev/api/v1/data
Download the dataset at: http://noogle.dev/api/v1/data
[[Category:Nixpkgs]]
[[Category:Nix]]