1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Merge pull request #35 from DeterminateSystems/push-zkyqytsppswn

Emit a warning about channel deprecation.
This commit is contained in:
Eelco Dolstra 2025-04-25 08:21:04 +00:00 committed by GitHub
commit 6468ece640
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View file

@ -8,6 +8,12 @@
# Description
> **Warning**
>
> nix-channel is deprecated in favor of flakes in Determinate Nix.
> For a guide on Nix flakes, see: <https://zero-to-nix.com/>.
> For details and to offer feedback on the deprecation process, see: <https://github.com/DeterminateSystems/nix-src/issues/34>.
Channels are a mechanism for referencing remote Nix expressions and conveniently retrieving their latest version.
The moving parts of channels are:

View file

@ -164,6 +164,11 @@ static void update(const StringSet & channelNames)
static int main_nix_channel(int argc, char ** argv)
{
warn(
"nix-channel is deprecated in favor of flakes in Determinate Nix. \
For a guide on Nix flakes, see: https://zero-to-nix.com/. \
For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.");
{
// Figure out the name of the `.nix-channels' file to use
auto home = getHome();