Skip to content

Commit 797c716

Browse files
committed
Suggest fix
1 parent 17a40e5 commit 797c716

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/libexpr/eval-settings.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ bool EvalSettings::isPseudoUrl(std::string_view s)
8585
std::string EvalSettings::resolvePseudoUrl(std::string_view url)
8686
{
8787
if (hasPrefix(url, "channel:")) {
88+
auto realUrl = "https://nixos.org/channels/" + std::string(url.substr(8)) + "/nixexprs.tar.xz";
8889
static bool haveWarned = false;
8990
warnOnce(haveWarned,
9091
"Channels are deprecated in favor of flakes in Determinate Nix. "
92+
"Instead of '%s', use '%s'. "
9193
"For a guide on Nix flakes, see: https://zero-to-nix.com/. "
92-
"For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.");
93-
return "https://nixos.org/channels/" + std::string(url.substr(8)) + "/nixexprs.tar.xz";
94+
"For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.",
95+
url, realUrl);
96+
return realUrl;
9497
} else
9598
return std::string(url);
9699
}

0 commit comments

Comments
 (0)