Open
Description
Is your feature request related to a problem?
nix repl
usage can be repetitive.- People tend to use the same repetitive / verbose commands and attributes.
- Those attributes do not align with what flake outputs are, so they should not, and often can not be added to the flake outputs.
- The ecosystem needs to be conservative about outputs, but less so about
repl
conveniences. - Some attributes are intended for debugging and such, and other code should not depend on their structure, which will change without notice.
Proposed solution
Add a flake output which is automatically loaded into the repl
scope, on top of the flake outputs (//
).
# nixpkgs/flake.nix
{
outputs = { self, ... }: {
legacyPackages = ...;
# (extraReplScope?)
# This is merged into the repl scope, not the flake
replScope = info: {
pkgs = self.legacyPackages.${info.currentSystem};
};
}
}
When loading the flake, it should be clear in the output which attributes are flake outputs, and which ones are the extra ones.
Alternative solutions
- Add
repl-overlays
setting #10203Configuration is a double edged sword. It lets "power users" be more comfortable, most of the time, but it requires everyone to invest time into that sort of thing, or accept an unpleasant product.
Additional context
Checklist
- checked latest Nix manual (source)
- checked open feature issues and pull requests for possible duplicates
Add 👍 to issues you find important.
Metadata
Metadata
Assignees
Type
Projects
Status
⚖ To discuss