mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
doc: add example usage for Gitea in tarball fetcher (#11116)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
This commit is contained in:
parent
621c23bbea
commit
f0a1c130a1
2 changed files with 28 additions and 0 deletions
|
@ -41,4 +41,30 @@ Link: <https://example.org/hello/442793d9ec0584f6a6e82fa253850c8085bb150a.tar.gz
|
||||||
For tarball flakes, the value of the `lastModified` flake attribute is
|
For tarball flakes, the value of the `lastModified` flake attribute is
|
||||||
defined as the timestamp of the newest file inside the tarball.
|
defined as the timestamp of the newest file inside the tarball.
|
||||||
|
|
||||||
|
## Gitea and Forgejo support
|
||||||
|
|
||||||
|
This protocol is supported by Gitea since v1.22.1 and by Forgejo since v7.0.4/v8.0.0 and can be used with the following flake URL schema:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://<domain name>/<owner>/<repo>/archive/<reference or revison>.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Example**
|
||||||
|
>
|
||||||
|
>
|
||||||
|
> ```nix
|
||||||
|
> # flake.nix
|
||||||
|
> {
|
||||||
|
> inputs = {
|
||||||
|
> foo.url = "https://gitea.example.org/some-person/some-flake/archive/main.tar.gz";
|
||||||
|
> bar.url = "https://gitea.example.org/some-other-person/other-flake/archive/442793d9ec0584f6a6e82fa253850c8085bb150a.tar.gz";
|
||||||
|
> qux = {
|
||||||
|
> url = "https://forgejo.example.org/another-person/some-non-flake-repo/archive/development.tar.gz";
|
||||||
|
> flake = false;
|
||||||
|
> };
|
||||||
|
> };
|
||||||
|
> outputs = { foo, bar, qux }: { /* ... */ };
|
||||||
|
> }
|
||||||
|
```
|
||||||
|
|
||||||
[Nix Archive]: @docroot@/store/file-system-object/content-address.md#serial-nix-archive
|
[Nix Archive]: @docroot@/store/file-system-object/content-address.md#serial-nix-archive
|
||||||
|
|
|
@ -259,6 +259,8 @@ Currently the `type` attribute can be one of the following:
|
||||||
`.tgz`, `.tar.gz`, `.tar.xz`, `.tar.bz2` or `.tar.zst`), then the `tarball+`
|
`.tgz`, `.tar.gz`, `.tar.xz`, `.tar.bz2` or `.tar.zst`), then the `tarball+`
|
||||||
can be dropped.
|
can be dropped.
|
||||||
|
|
||||||
|
This can also be used to set the location of gitea/forgejo branches. [See here](@docroot@/protocols/tarball-fetcher.md#gitea-and-forgejo-support)
|
||||||
|
|
||||||
* `file`: Plain files or directory tarballs, either over http(s) or from the local
|
* `file`: Plain files or directory tarballs, either over http(s) or from the local
|
||||||
disk.
|
disk.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue