summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorColin <colin@uninsane.org>2023-05-23 10:21:08 +0000
committerEmery Hemingway <ehmry@posteo.net>2023-06-11 09:02:34 +0100
commit954d3794ae89e5cdd27714954e9d59c3f5de1aae (patch)
tree4fdc23ffe417ff70c57b0efdfb75bf9807c40823 /pkgs
parent944c7fa720e5628fd415b1fedf89ee7f941fcec0 (diff)
fetchFromSourcehut: expose `gitRepoUrl` to consumers
notable consumers include `unstableGitUpdater`. other git-like fetchers (`fetchFromGitHub`) already do this.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/fetchsourcehut/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchsourcehut/default.nix b/pkgs/build-support/fetchsourcehut/default.nix
index 983b5683eb1c..ed6e85bd639b 100644
--- a/pkgs/build-support/fetchsourcehut/default.nix
+++ b/pkgs/build-support/fetchsourcehut/default.nix
@@ -15,7 +15,8 @@ with lib;
assert (lib.assertOneOf "vc" vc [ "hg" "git" ]);
let
- baseUrl = "https://${vc}.${domain}/${owner}/${repo}";
+ urlFor = resource: "https://${resource}.${domain}/${owner}/${repo}";
+ baseUrl = urlFor vc;
baseArgs = {
inherit name;
} // removeAttrs args [
@@ -42,6 +43,9 @@ let
postFetch = optionalString (vc == "hg") ''
rm -f "$out/.hg_archival.txt"
''; # impure file; see #12002
+ passthru = {
+ gitRepoUrl = urlFor "git";
+ };
};
};
};