Hello,
So I have not looked into nimble too much, however what it seems like is nimble only pulls code from the centralised nimble repository hosted by the nim devs.
This causes a massive concern for centralisation, languages like java (maven/gradle build tools), use the repository system where dependencies are checked against the list of repositories defined in the configuration. Rust (cargo) and go both support cloning of code from any git repository, which means git based dependencies can be used, furthermore cargo also supports their own registries for dependencies, with the downside that crates.io does not permit external dependencies used in dependencies added to it.
It would be useful if nimble could (or already does) support at least one alternative to the centralised repository for pulling code. Not everyone wants to rely on another service for their code dependencies, people like me.
Is this already supported, if so could docs to it be linked or could someone explain, if not, what is the likelihood of this being implemented into the nimble package manager?
Thank you, Polarian
First of all, you can always just give Nimble a Git repository to install from - nimble install packageUrl
Also, Nimble is not really "centralized" in the same way NPM or PyPI is - Nimble just uses the official package index by default, which links package names to their repo URLs - https://github.com/nim-lang/packages
Is there any documentation on package indexes, and is it possible to have multiple package indexes?
Thanks, Polarian
Nimble can pull packages from Git or Mercurial repositories, even if they are not in any index. But in that case you have to specify the repo. So, instead of:
requires "mypackage = 1.0.0"
You have to write (for example, if you want the newest commit):
requires "https://github.com/user/package#head"
Nimble also supports adding own packages lists: https://github.com/nim-lang/nimble#configuration