-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Gitea instances other than codeberg.org or gitea.com #257
Comments
I think it is doable. I created a quick wip marsam@565961d |
Sure. My only worry is that the version api might collide with other software. Hopefully those will never become valid in future: https://crates.io/api/v1/version There is also https://git.clan.lol/api/v1/signing-key.gpg, where we could check for a HTTP 200 code, which seems like a bit less generic api. |
I look at the swagger and I didn't find a generic endpoint where you could extract something gitea specific. |
Maybe then we should allow people to specifically try using a certain fetcher? (e.g. the |
Maybe fetchFromGitea can inject some meta attribute that allows us to detect gitea? |
Something like this in github? diff --git a/pkgs/build-support/fetchgitea/default.nix b/pkgs/build-support/fetchgitea/default.nix
index 513ceba861cb..ceb29c59433c 100644
--- a/pkgs/build-support/fetchgitea/default.nix
+++ b/pkgs/build-support/fetchgitea/default.nix
@@ -5,5 +5,7 @@
lib.makeOverridable (
{ domain, ... }@args:
-fetchFromGitHub ((removeAttrs args [ "domain" ]) // { githubBase = domain; })
-)
+fetchFromGitHub ((removeAttrs args [ "domain" ]) // {
+ githubBase = domain;
+ meta.gitea = true;
+})) |
These two are the only sites that would be recognized as Gitea in https://github.com/Mic92/nix-update/blob/master/nix_update/version/gitea.py#L10, despite the rising popularity of self-hosting Gitea/Forgejo/... instances. It would be nice to test if the given URL is hosted on Gitea or not, using an API check, or at least give us the option to force nix-update to treat the URL as a link to a Gitea repository.
The text was updated successfully, but these errors were encountered: