summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorLuc Perkins <lucperkins@gmail.com>2022-10-26 15:03:19 -0300
committerCole Helbling <cole.e.helbling@outlook.com>2022-10-29 10:50:29 -0700
commit0c738e2e1826e8347b32a5649bdae2ccb23f2a8a (patch)
tree569efa4f56a24e372eb54af4f982bad01599835b /flake.nix
parentaudacity: build in release mode (diff)
downloadnixpkgs-0c738e2e1826e8347b32a5649bdae2ccb23f2a8a.tar.gz
doc: add code comment clarifying the meaning of legacyPackages
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 67ecfc6eb084..4c9ad799a003 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 = {