From fdebfa8bd84f5d733b3f799a96e625d59bcc7a2a Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Mon, 23 Aug 2021 12:50:59 -0700 Subject: [PATCH 1/1] Wrap nixpkgs with a warning --- README.md | 14 ++++++++++++++ default.nix | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 README.md create mode 100644 default.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..574225d --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# warn-nixpkgs + +Wrap nixpkgs, but emit a warning if this one is ever accessed. + +The Nix world is gradually adopting flakes and moving toward a world +where there are no longer `nix-update`-maintained channels. During that +transition, it's nice to have system channels that still work, but emit +a warning when they are accessed to alert the user of of a gap in their +move-to-flakes. + +This repo can be used as a drop-in replacement for the `nixpkgs` channel. +This repo doesn't contain `nixpkgs` -- this is merely a thin wrapper. +Configure the actual `nixpkgs` to forward to as a `nixpkgs-warned` +channel. diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..95c7a7e --- /dev/null +++ b/default.nix @@ -0,0 +1,4 @@ +args@{ ... }: +let actualNixpkgs = import args; +in actualNixpkgs.lib.warn +("Using legacy channel nixpkgs from " + ) actualNixpkgs -- 2.44.1