2024-06-04 20:22:06 +00:00
|
|
|
{ lib, fetchFromGitForge }:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
lib.makeOverridable (
|
2024-03-08 16:10:12 +00:00
|
|
|
{ owner, repo, rev
|
|
|
|
, name ? null # Override with null to use the default value
|
2024-05-19 08:45:26 +00:00
|
|
|
, pname ? "source-${githubBase}-${owner}-${repo}"
|
2024-05-02 00:46:19 +00:00
|
|
|
, fetchSubmodules ? false, leaveDotGit ? null
|
|
|
|
, deepClone ? false, private ? false, forceFetchGit ? false
|
|
|
|
, sparseCheckout ? []
|
2024-06-04 20:22:06 +00:00
|
|
|
, githubBase ? "github.com"
|
2024-03-08 16:01:11 +00:00
|
|
|
, passthru ? { }
|
2024-05-02 00:46:19 +00:00
|
|
|
, meta ? { }
|
|
|
|
, ... # For hash agility
|
|
|
|
}@args:
|
|
|
|
|
|
|
|
let
|
|
|
|
baseUrl = "https://${githubBase}/${owner}/${repo}";
|
|
|
|
gitRepoUrl = "${baseUrl}.git";
|
2024-06-04 20:22:06 +00:00
|
|
|
url = "${baseUrl}/archive/${rev}.tar.gz";
|
|
|
|
passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "forceFetchGit" "githubBase" "varPrefix" ];
|
2024-05-02 00:46:19 +00:00
|
|
|
in
|
2024-06-04 20:22:06 +00:00
|
|
|
fetchFromGitForge {
|
|
|
|
inherit owner repo rev name pname baseUrl gitRepoUrl url fetchSubmodules leaveDotGit deepClone forceFetchGit sparseCheckout passthruAttrs passthru meta;
|
2024-03-08 16:01:11 +00:00
|
|
|
})
|