From: Scott Worley Date: Mon, 23 Aug 2021 19:50:59 +0000 (-0700) Subject: Wrap nixpkgs with a warning X-Git-Url: http://git.scottworley.com/warn-nixpkgs/commitdiff_plain/fdebfa8bd84f5d733b3f799a96e625d59bcc7a2a Wrap nixpkgs with a warning --- fdebfa8bd84f5d733b3f799a96e625d59bcc7a2a 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