Skip to content

discussion: nixpkgsFor #98

Description

@bugsbugsbux

This repo often uses a custom nixpkgsFor.${system} instead of nixpkgs.legacyPackages.${system} without much elaboration. The wiki does not mention nixpkgsFor

nixpkgsFor implementation is similar to that of legacyPackages, but allows to apply custom overlays. However, does it have performance penalties (the key legacyPackages is special)
and does it work with .follows or still create a custom instance (After all, legacyPackages also applies overlays)?

Finally, is there no way to make this lazy? It always evaluates once for each system, but is this really always necessary? If I just want to know the contents of a flake (nix flake show), I already know the necessary evaluation depth to get the key names necessary to determine the contained outputs. There should be a special funtion to map over some values and collect them into a set with a certain name, but not actually run the mapped function until the key is accessed. This kind-of works for deeper nested sets, but not if you just want the toplevel keys of a set to be lazy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions