2022-01-23 Nixpkgs Architecture Team Meeting #26

Notes

Stick to default.nix

Arguments brought up by @Sandro:

  • Generally the Fun prefix is used when constructing complex things like package sets like passthruFun or kernelConfigFun

    • Acknowledged, but not a problem
  • Makes the transition needlessly harder

    • People have to learn something new anyways
    • We can have a good error message
    • Good to bundle minor changes to avoid churn
  • Every guide on the internet will suddenly be wrong in two ways

  • If the package should be build from the cli without the boiler plate code then the following would need to be used
    nix-build -E 'with import <nixpkgs> {}; callPackage pkgs/unit/hell/hello/pkg-fun.nix {}'

    • @infinisil: The above is an ugly hack

    • @infinisil: Can do good error messages

    • @roberth: make clear that avoiding default.nix for callPackage things is a (minor) goal, not just an incidental changes.

  • If it [also having modules and other package-related Nix files in the unit dirs] isn’t the goal of the RFC then it shouldn’t be changed to keep the RFC smaller in size and less topics to discuss and bikesheed about.

    • @roberth & @Ericson2314: The “back half” of the RFC (alternatives, future work, etc.) is supposed to discuss the wider context.
    • @infinisil: Still, since we said do say we intend to keep the unit directory structure unstable, there isn’t a strong reason to “think ahead” like this.
    • @roberth: We could move to “future work” and merely reference in the alternatives section.
    • @Ericson2314: +1

Allow variants in all-packages to use unit directories by roberth · Pull Request #27 · nixpkgs-architecture/simple-package-paths · GitHub

  • “full variants” (need more files in the same unit) is out of scope
  • “light variants” (call the same unit (same pkg-fun.nix)) can be in scope.
  • No args.nix for now
  • The requirements are up-to-date but
    • Mention that all-packages should only callPackage the pkg-fun.nix though, as this is the only public interface of the unit.

Looking over the automatic draft PR

  • res is gone!
  • beware of case-folding!
    • just need to case-fold sharding dirs
    • the unit dirs themselves can stay original
3 Likes

drv-parts

This stands without further comment. Thank you all for your work!

3 Likes