A collection of extra (and maybe opinioated) functions to
nixpkgs.lib
!
This project aims to enhance the default nixpkgs.lib
with additional extra functions.
Below you can find the supported list of extra functions categorized by utility. The list for now is very small, but more functions will be created for sure:
- collectNixFiles: Collects
.nix
files recursively from a directory and returns them as an attribute set.
- mkApp: Produces an "app" type for Nix flakes given a derivation and optional parameters.
- filterPkgs: Filters packages based on a specified attribute path and criteria.
- mkNixpkgs: Imports and configures a Nixpkgs environment with custom settings, overlays, and system type.
To use lib-extras
in your project:
- Add this repository as an input to your flake.
lib-extras = { url = "github:aldoborrero/lib-extras"; inputs.nixpkgs.follows = "nixpkgs"; };
- Use the extended library in your Nix expressions:
lib = nixpkgs.lib.extend (final: _: inputs.lib-extras.lib final);
To make the most of this repository, you should have the following installed:
After cloning this repository and entering inside, run direnv allow
when prompted, and you will be met with the menu prompt.
Contributions to lib-extras
are welcome! Whether you're fixing bugs, improving documentation, or introducing a new feature, your efforts and contributions will be appreciated.
- Fork this repository.
- Create a new branch for your feature or fix.
- Commit your changes with meaningful commit messages.
- Open a pull request and provide a description of your changes.
This project is licensed under the MIT license. For more details, see the LICENSE
file in the repository.