Collection of miscellaneous plugins for the nix expression language
A collection of useful Nix native plugins.
This plugin adds a setting extra-builtins-file
and two builtins:
builtins.extraBuiltins
: If the extra-builtins-file
exists, it isimportNative
andexec
primops, even if allow-unsafe-native-code-during-evaluation
false
, and the result is available as extraBuiltins
. If theextraBuiltins
will be null
.builtins.nix-cflags
: A set of required flags needed to build aThis allows users to specify a fixed set of safe extra builtins
without enabling arbitrary Nix expressions to run arbitrary native
code. The expectation is that extra-builtins-file
defines a set of
builtins, but ultimately that’s up to the end user.
To enable these plugins system-wide on NixOS, add the following to your configuration:
nix.extraOptions = ''
plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
'';