2022-12-12 Nixpkgs Architecture Team Meeting #21

Nixpkgs Architecture Team Meeting #21


Read file type by aakropotkin · Pull Request #7447 · NixOS/nix · GitHub

  • Should we do full stat?

    • @Ericson2314: Seems like a good idea if it is just the info in Nix’s restricted file system model.
    • @growpotkin: Should be a separate PR/builtin
    • @growpotkin: Playing devil’s advocate, sometimes useful to check executable on direction in particular
      • @Ericson2314: Oh wait, that convinces me the opposite! Directories do not have exe bit in Nix’s model, so we shouldn’t be able to see that with primop.
    • avoiding a derivation if it’s not necessary to fix up the permission bitsexe
    • @infinisil: Use case for checking executable bit at eval time?
    • @infinisil: Alternative: Make the primop internal, not accessible at first
    • @growpotkin: Some cost to allocating attribute for returning multiple properties
    • @roberth: Let’s keep it simple with pathType for now, can have pathInfo later.
  • What is the perf situation?

    • Linux is fast regardless
      • Fast on growpotkin’s machine either way
      • @Ericson2314: Most file systems will return the info with the dir entry and so this change is dead code.
    • Needs to be tested on Darwin
    • @Ericson2314: Scared that we still have no idea what made things slow on Darwin.
    • @growpotkin: Never scared, arms crossed

Add a simple tool to print Nix path references by infinisil · Pull Request #22 · nixpkgs-architecture/simple-package-paths · GitHub

  • Scans Nix files for paths
  • Prints files which are only referenced from pkgs/top-level/all-packages.nix
  • @infinisil: Should interface be general?
    • @wanja: Fine to be one off
    • @Ericson2314: Agreed. The code can be nice when it’s easy to do so – ready to go in a library e.g., but the CLI we can not bother to generalize prematurely.

Action items