File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,17 @@ bool EvalSettings::isPseudoUrl(std::string_view s)
8484
8585std::string EvalSettings::resolvePseudoUrl (std::string_view url)
8686{
87- if (hasPrefix (url, " channel:" ))
88- return " https://nixos.org/channels/" + std::string (url.substr (8 )) + " /nixexprs.tar.xz" ;
89- else
87+ if (hasPrefix (url, " channel:" )) {
88+ auto realUrl = " https://nixos.org/channels/" + std::string (url.substr (8 )) + " /nixexprs.tar.xz" ;
89+ static bool haveWarned = false ;
90+ warnOnce (haveWarned,
91+ " Channels are deprecated in favor of flakes in Determinate Nix. "
92+ " Instead of '%s', use '%s'. "
93+ " For a guide on Nix flakes, see: https://zero-to-nix.com/. "
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;
97+ } else
9098 return std::string (url);
9199}
92100
@@ -103,4 +111,4 @@ Path getNixDefExpr()
103111 : getHome () + " /.nix-defexpr" ;
104112}
105113
106- } // namespace nix
114+ } // namespace nix
You can’t perform that action at this time.
0 commit comments