fetchFromSourcehut: expose gitRepoUrl
to consumers
notable consumers include `unstableGitUpdater`. other git-like fetchers (`fetchFromGitHub`) already do this.
This commit is contained in:
parent
944c7fa720
commit
954d3794ae
1 changed files with 5 additions and 1 deletions
|
@ -15,7 +15,8 @@ with lib;
|
||||||
assert (lib.assertOneOf "vc" vc [ "hg" "git" ]);
|
assert (lib.assertOneOf "vc" vc [ "hg" "git" ]);
|
||||||
|
|
||||||
let
|
let
|
||||||
baseUrl = "https://${vc}.${domain}/${owner}/${repo}";
|
urlFor = resource: "https://${resource}.${domain}/${owner}/${repo}";
|
||||||
|
baseUrl = urlFor vc;
|
||||||
baseArgs = {
|
baseArgs = {
|
||||||
inherit name;
|
inherit name;
|
||||||
} // removeAttrs args [
|
} // removeAttrs args [
|
||||||
|
@ -42,6 +43,9 @@ let
|
||||||
postFetch = optionalString (vc == "hg") ''
|
postFetch = optionalString (vc == "hg") ''
|
||||||
rm -f "$out/.hg_archival.txt"
|
rm -f "$out/.hg_archival.txt"
|
||||||
''; # impure file; see #12002
|
''; # impure file; see #12002
|
||||||
|
passthru = {
|
||||||
|
gitRepoUrl = urlFor "git";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue