From 954d3794ae89e5cdd27714954e9d59c3f5de1aae Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 23 May 2023 10:21:08 +0000 Subject: [PATCH] fetchFromSourcehut: expose `gitRepoUrl` to consumers notable consumers include `unstableGitUpdater`. other git-like fetchers (`fetchFromGitHub`) already do this. --- pkgs/build-support/fetchsourcehut/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; + }; }; }; };