aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake.md
diff options
context:
space:
mode:
authoramesgen <amesgen@amesgen.de>2022-12-06 00:16:25 +0100
committerAlexander Esgen <alexander.esgen@tweag.io>2022-12-06 10:36:39 +0100
commit105677140dc3674977381a3c3f803c31999d0c19 (patch)
treec5b2c592d2359f2d49588a1401c2b2ae0e2ea4e8 /src/nix/flake.md
parentbfcf30f0abdfd1df4364919f203d04ff08d7314c (diff)
Document `gitlab` input scheme
Diffstat (limited to 'src/nix/flake.md')
-rw-r--r--src/nix/flake.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nix/flake.md b/src/nix/flake.md
index a1ab43281..039215b72 100644
--- a/src/nix/flake.md
+++ b/src/nix/flake.md
@@ -222,6 +222,37 @@ Currently the `type` attribute can be one of the following:
* `github:edolstra/dwarffs/unstable`
* `github:edolstra/dwarffs/d3f2baba8f425779026c6ec04021b2e927f61e31`
+* `gitlab`: Similar to `github`, is a more efficient way to fetch
+ GitLab repositories. The following attributes are required:
+
+ * `owner`: The owner of the repository.
+
+ * `repo`: The name of the repository.
+
+ Like `github`, these are downloaded as tarball archives.
+
+ The URL syntax for `gitlab` flakes is:
+
+ `gitlab:<owner>/<repo>(/<rev-or-ref>)?(\?<params>)?`
+
+ `<rev-or-ref>` works the same as `github`. Either a branch or tag name
+ (`ref`), or a commit hash (`rev`) can be specified.
+
+ Since GitLab allows for self-hosting, you can specify `host` as
+ a parameter, to point to any instances other than `gitlab.com`.
+
+ Some examples:
+
+ * `gitlab:veloren/veloren`
+ * `gitlab:veloren/veloren/master`
+ * `gitlab:veloren/veloren/80a4d7f13492d916e47d6195be23acae8001985a`
+ * `gitlab:openldap/openldap?host=git.openldap.org`
+
+ When accessing a project in a (nested) subgroup, make sure to URL-encode any
+ slashes, i.e. replace `/` with `%2F`:
+
+ * `gitlab:veloren%2Fdev/rfcs`
+
* `sourcehut`: Similar to `github`, is a more efficient way to fetch
SourceHut repositories. The following attributes are required: