This is to avoid conflicts when imported from multiple locations.
Example: Module nur.repos.foo.modules.bar defines an option.
If nur.repos.foo.modules.bar is a function, importing it from
multiple places will result in defining the option multiple times,
which the module system doesn't support.
If it instead is a path, there won't be a conflict, the option
will only be defined once.
This is essential to get modules in NUR to work. By taking a separate
argument for NUR's nixpkgs (for fetchgit, fetchzip and lib), we don't
need to evaluate the nixpkgs used for repos.
This also implies that you won't be able to `callPackage` NUR anymore,
and instead you'll have to use `import (builtins.fetchGit ".../NUR") {
inherit pkgs; }` instead. Doing this also prevents the evaluation of
pkgs. In case of NixOS, this pkgs depends on your whole config, which is
the source of the recursion. Evaluating this at the last possible moment
is key.
This also means that you won't be able to take package arguments in a
repo definition, you instead get just `pkgs`, also to avoid evaluation
of it.
An error will be thrown when pkgs was required for evaluation but wasn't
passed to the NUR import
The old callPackage syntax will still be supported albeit with a warning
Also repos receive a lib argument,
Using this lib instead of pkgs.lib makes it possible to define library
functions that use other library functions without depending on pkgs ->
should prevent some infinite recursion cases for NixOS module usage.