Hi,
I shared this on IRC a month ago, but wanted to share it here too after it has been running non-stop for a month.
What is it?
This is mostly a cron job that clones all the Git and Mercurial repositories and offers them through a modified package registry. What I'm trying to accomplish here is two things. First, create a mirror of all the repos since previous experience has shown me that repos can be easily taken down either by the authors or Github itself (Github hasn't taken any Nim related repos to the extend of my knowledge). Second, I don't think of myself as being proficient with Mercurial and don't want to mix my packages with other version control systems, the fix being to transform the Mercurial repos to Git repos via HgGit. An example of a transformed Mercurial repo can be found at https://cgit.nim.moe/strfmt You can find the packages registry at https://reg.nim.moe/packages.json and an overview of the cloned repos served by cgit at https://cgit.nim.moe/. The packages list is updated every 10 minutes and all the packages are fetched and if needed pulled from source every 30 minutes. The url of all the packages is modified to target the ones at https://git.nim.moe/. (Why git.nim.moe and not cgit.nim.moe? Because git.nim.moe uses the git http backend while cgit.nim.moe uses a cgit http with similar functionality but with not enough to be fully used by nimble)
For a little bit of context, I'm the maintainer/creator/BDFL of https://github.com/nimgl/nimgl and one of the packages that inspired me was glfw by ephja (I haven't for a while used it since I made my own bindings) but one day it simply got deleted after the mass migration to Gitlab. That's what inspired me to do this thing.
Why should I use this?
You shouldn't. The main reason it exists is so packages don't die out after simply being deleted. The only realistic reason is if you find an active Mercurial package which you would like to use without having to interface with Mercurial. If a package you needed was deleted I would recommend to make a clone for yourself from the mirror repo instead of directly referencing it from nim.moe.
I still want to use it
Well, either if for a reason previously stated or because you don't want to trust Github but you do me (I don't know why this would happen). You can add it by following the Nimble readme. And simply add:
[PackageList]
name = "official"
url = "https://reg.nim.moe/packages.json"
My biggest concern is that I'm a college student earning exactly $0 dollars a year (By no means a legal tax statement). So all I can do is a $5 droplet in digitalocean and the yearly expenses of the domain. Currently all the packages' data is sitting at a 5.4Gb (21.86% of the droplet's disk) with still room to grow, the other part being that if enough people use it the little baby droplet won't be able to support the load.
I was using X package but it disappeared, do you have it?
This is a project (Baby project? It's little.) that started a month ago, so all the projects that were deleted before this date (20/04/2020) were not able to be cloned. You can find a list of such projects at https://reg.nim.moe/not_found.txt.
Please if you have a fork/clone/zip/png of one of this packages let me know either by DM or a comment here so it can be uploaded even if it isn't the latest version.
I like the idea, but I trust no one. Not even me (Yourself)
You can easily create your own instance, I don't have step by step guide on how to create it but all you need is a git http backend and the cron jobs located at https://github.com/nim-moe/cron. Also Mercurial and the HgGit extension to be able to push the repo from hg to git. Cgit is not necessary since it is only used to give an overview of what packages have been updated and when was the last update loaded into the system.
The future of the project a.k.a. I like the domain
I really like the domain, but this was a mini project made in a few hours mostly to try and ignite a conversation on the topics of Nim's package manager and what we as a community will do to prevent packages from being lost into the void. If any of you have any better ideas or want to use the domain name to start a project related to this issues please feel more than free to contact me. And I would even be happy to contribute some code.