From 0c738e2e1826e8347b32a5649bdae2ccb23f2a8a Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Wed, 26 Oct 2022 15:03:19 -0300 Subject: doc: add code comment clarifying the meaning of legacyPackages --- flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 67ecfc6eb08..4c9ad799a00 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,15 @@ }).nixos.manual.x86_64-linux; }; + # The "legacy" in `legacyPackages` doesn't imply that the packages exposed + # through this attribute are "legacy" packages. Instead, `legacyPackages` + # is used here as a substitute attribute name for `packages`. The problem + # with `packages` is that it makes operations like `nix flake show + # nixpkgs` unusably slow due to the sheer number of packages the Nix CLI + # needs to iterate through. But when the Nix CLI sees a `legacyPackages` + # attribute it displays `omitted` instead of iterating through all + # packages, which keeps `nix flake show` on Nixpkgs reasonably fast, + # though less information rich. legacyPackages = forAllSystems (system: import ./. { inherit system; }); nixosModules = { -- cgit 1.4.1