What are package sets?

Silly beginner question: what exactly are package sets?

Is this part of nix flakes?

Any terse definition you have would be helpful.
If you have any links or resources that helped explain them in an introductory way that would be great too.

Package sets are nix expressions that evaluate to an attrset where the names are the names of the packages (or names of recursive package sets) and the values are derivations (or package sets).

The most famous examples are nixpkgs and the nur.

Flakes can provide package sets as outputs.


What ryan said. In code essentially this:

  pkgs = import <nixpkgs> {};
  lib = pkgs.lib;
  lib.recurseIntoAttrs {
    a = pkgs.callPackage ./a {};
    b = pkgs.callPackage ./b {};
    # ...
1 Like

Nix User Repository for anyone reading this later!

1 Like