fetchFrom{Savannah,RepoOrCz,GitLab}: added fetchgit migration helpers

wip/yesman
Edward Tjörnhammar 9 years ago
parent 4256ab778a
commit 63c00f2746
  1. 19
      pkgs/top-level/all-packages.nix

@ -375,12 +375,31 @@ let
inherit sha256;
};
# gitorious example
fetchFromGitorious = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip {
inherit name;
url = "https://gitorious.org/${owner}/${repo}/archive/${rev}.tar.gz";
inherit sha256;
};
# cgit example, snapshot support is optional in cgit
fetchFromSavannah = { repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip {
inherit name sha256;
url = "http://git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo}-${rev}.tar.gz";
};
# gitlab example
fetchFromGitLab = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip {
inherit name sha256;
url = "https://gitlab.com/${owner}/${repo}/repository/archive.tar.gz?ref=${rev}";
};
# gitweb example, snapshot support is optional in gitweb
fetchFromRepoOrCz = { repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip {
inherit name sha256;
url = "http://repo.or.cz/${repo}.git/snapshot/${rev}.tar.gz";
};
resolveMirrorURLs = {url}: fetchurl {
showURLs = true;
inherit url;

Loading…
Cancel
Save