Skip to content

Reorg Nixpkgs --- rip off bandaid approach #172008

@Ericson2314

Description

@Ericson2314

Issue description

Nixpkgs' architecture is not the best. Issues:

  • Leaks memory: too many cycles mean nothing can be GC'd
  • overriding is gross: We should compose small parts into the final thing we want. "Modifying" the whole post composition is fundamentally anti-declarative

Potential solution

  • I think we need to expose all the functions we callPackage on their own.
  • As a middle ground, also expose the function to be fixed ("all packages") but no fixed point "yet"
  • derivations shouldn't leak either inputs, but just return string (single output) or record of strings. Anything we want to expose should be done with passthru
  • No .override .overrideAttrs .extend or similar. If you want something different, you need to rebuild the fixed point manually.

This is a radical shift that would make many "minor" overrides quite a bit more annoying, in addition to other breakage. But I think it would also put us on a much firmer, more sustainable foundation. Any idea how we get there incrementally?

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions