How to specify a Gitea server with fetchFromGitea?


I’m new to Nix and NixOS. I’m looking into creating Nix packages & have been looking at other Nix packages’ syntax. I see a lot of “fetchFromGithub” being used which pulls from without having to specify that.

I have entered the correct domain into the Domain field under fetchFromGitea, but it does not want to connect for some reason & continues to state “Could not resolve host:”. I can take the same exact URL it’s using and wget the file perfectly fine from the same CLI. I’m not sure what I’m missing here!

My Questions are: How can I get fetchFromGitea to work? Is there an example somewhere I can look at?


1 Like

You can use the domain argument:

You can see many examples in Nixpkgs:

It should probably be documented in the manual:

Thank you for your help and indepth explanation. I agree that this should be in the documentation and have opened a Pull Request to do so here, Added fetchFromGitea to docs by jahway603 · Pull Request #165133 · NixOS/nixpkgs · GitHub