Build an isolated nushell environment with a specific set of plugins (from either nixpkgs or built from source) and nu libraries (from source).
See the examples
folder for how to use it. Examples show usage with regular nix
flakes and with devenv
.
lib.nushellWith
: a function that takes a description of a nushell configuration (which libraries and plugins to use) and outputs a nushell wrapperlib.makeNuLibrary
: a function that takes a nushell library as a folder (e.g. obtained from github via one of your flake inputs flagged withflake = false;
) and patches it to add some binary dependencies to its path when it is imported. It outputs the resulting patched folder as a derivation, ready to be passed tolibraries
inlib.nushellWith
packages.<system>
: a set of pre-packaged nushell libraries (see below)
This flake also packages (as Nix derivations) some nushell libraries published
on Github, so their dependencies are taken care of for you. PRs to add new
libraries to this list are very much welcome. Don't
forget to add the URL of the library to wrap in the inputs
of the
flake.nix
file too.
- Only plugins written in Rust can be used
- Using plugins built from source with
devenv
only works with devenv >= 1.1
- All names for external consumption (lib functions, packages) are
camelCased
- All other names are
snake-cased