I don't know why, but for some reason nix already parses the relative
file as a path while still concatenating it with strings. I made sure
that nix instead concatednates the strings with right-to-left
precedence, so that the "/" is included
see also https://logs.nix.samueldr.com/nixos/2020-10-21#4134149;
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.