fetchFromGitLab: Use API archive download endpoint.

According to

https://gitlab.com/gitlab-org/gitlab-ce/issues/45586#note_69828451

this URL is something with guaranteed stability.
This commit is contained in:
Eric Wolf 2018-04-23 21:27:42 +02:00
parent 21d688f9b8
commit 94a420b921

View File

@ -288,7 +288,7 @@ with pkgs;
... # For hash agility
}@args: fetchzip ({
inherit name;
url = "https://gitlab.com/${owner}/${repo}/-/archive/${rev}/${repo}-${rev}.tar.gz";
url = "https://gitlab.com/api/v4/projects/${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
meta.homepage = "https://gitlab.com/${owner}/${repo}/";
} // removeAttrs args [ "owner" "repo" "rev" ]) // { inherit rev; };