Skip to content

Commit 6468ece

Browse files
authored
Merge pull request #35 from DeterminateSystems/push-zkyqytsppswn
Emit a warning about channel deprecation.
2 parents ad7100f + d97d311 commit 6468ece

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

doc/manual/source/command-ref/nix-channel.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
# Description
1010

11+
> **Warning**
12+
>
13+
> nix-channel is deprecated in favor of flakes in Determinate Nix.
14+
> For a guide on Nix flakes, see: <https://zero-to-nix.com/>.
15+
> For details and to offer feedback on the deprecation process, see: <https://github.com/DeterminateSystems/nix-src/issues/34>.
16+
1117
Channels are a mechanism for referencing remote Nix expressions and conveniently retrieving their latest version.
1218

1319
The moving parts of channels are:

src/nix-channel/nix-channel.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ static void update(const StringSet & channelNames)
164164

165165
static int main_nix_channel(int argc, char ** argv)
166166
{
167+
warn(
168+
"nix-channel is deprecated in favor of flakes in Determinate Nix. \
169+
For a guide on Nix flakes, see: https://zero-to-nix.com/. \
170+
For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.");
171+
167172
{
168173
// Figure out the name of the `.nix-channels' file to use
169174
auto home = getHome();

0 commit comments

Comments
 (0)