git.iko.soy/typeable/nixpkgs
on master help sign in
doc/fetchers: document leaveDotGit, deepClone and fetchSubmodules
commit0096eb9274b430c8cf1a699c68054972c1845291 authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> dateMon 21 Dec 2020, 14:21 (6 years ago) parent697b46a
1 file changed+4
doc/builders/fetchers.chapter.md+4
doc/builders/fetchers.chapter.md+4
@@ -31,6 +31,8 @@ Used with Subversion. Expects `url` to a Subversion directory, `rev`, and `sha25
3131
3232Used with Git. Expects `url` to a Git repo, `rev`, and `sha256`. `rev` in this case can be full the git commit id (SHA1 hash) or a tag name like `refs/tags/v1.0`.
3333
34+Additionally the following optional arguments can be given: `fetchSubmodules = true` makes `fetchgit` also fetch the submodules of a repository. If `deepClone` is set to true, the entire repository is cloned as opposing to just creating a shallow clone. `deepClone = true` also implies `leaveDotGit = true` which means that the `.git` directory of the clone won't be removed after checkout.
35+
3436## `fetchfossil`
3537
3638Used with Fossil. Expects `url` to a Fossil archive, `rev`, and `sha256`.
@@ -49,6 +51,8 @@ A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are m
4951
5052`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `sha256` is currently preferred.
5153
54+`fetchFromGitHub` uses `fetchzip` to download the source archive generated by GitHub for the specified revision. If `leaveDotGit`, `deepClone` or `fetchSubmodules` are set to `true`, `fetchFromGitHub` will use `fetchgit` instead. Refer to its section for documentation of these options.
55+
5256## `fetchFromGitLab`
5357
5458This is used with GitLab repositories. The arguments expected are very similar to fetchFromGitHub above.