2024-04-10 Nix team meeting minutes #138

Nix release in Nixpkgs 24.05

  • 2.21 or 2.22
    • 2.22 is due next week
    • Suggestion: aim for 2.22 and spend the month after its release focusing on bugs (ZHF-style)
    • @thufschmitt will communicate about that in the Nixpkgs thread

CLI stabilisation

Make 'nix store gc' use the auto-GC policy by edolstra · Pull Request #7851 · NixOS/nix · GitHub

Still latest blocker for nix store. @edolstra will finish it

Nix path-info

Alredy discussed, but didn’t open an issue.

Nix build

Also to translate into an issue

Output format (first iteration),

  "installables": [
      "outputs": {
        "out": {
            "path": "/nix/store/d29xassiyyf71ls2vbvx3vywrdcx52c3-hello-2.12.1" 

nix develop / nix print-dev-env

nix shell

  • Big question: which environment variables to set?
    • Trying to solve an infinite problem
    • Should it be delegated to a nixpkgs cli?
    • Suggestion:
      • Have it set a fixed carefuly picked set of variables (PATH, XDG_*, etc…)
      • Defer the rest to a possible nixpkgs-cli

Suggestion for a naming scheme:

  • Rename 'nix shell' · Issue #4715 · NixOS/nix · GitHub

    • somewhat old comment; main point is the system behind it, not the details, which need to be updated for devShell attr and package attrsets
    • derivationdevshell (to mirror devShell attr)
    • dev is probably better because devshell shell would be a pain, and short is good for frequently used command
  • Plumbing commands

    • nix dev: devShell attribute-based, or fall back to nix develop-like behavior
      • nix dev print-env
      • nix dev shell
      • nix dev run
      • nix dev script (produce bash script, or should be print-env flag, or scoped out at first)
    • nix env: modify the environment
      • nix env run: setenv + execvp
        • @thufschmitt: Could just be a flag to nix run/nix package run
      • nix env shell: setenv + start $SHELL
      • nix env print-env
    • nix package: “normal” use of installable (whatever that means for the verb)
      • nix package build: nix build
      • nix package run: nix run
      • nix package info: --dry-run --json, print meta
      • nix package edit:
    • nix sandbox: issue tbd (@roberth)
  • Keep convenience aliases, at least for now

  • -c/--command argument to nix run

    • Just changes the thing that gets run
    • Restricted to a relative path nix run foo --command /bin/sh shouldn’t be allowed

I wasn’t in that meeting, so I’m quite confused why the Nixpkgs CLI option wasn’t discussed in more detail. I’m convinced that delegating that whole package management UX problem to the one Nix consumer that is all about packages would make a lot of hassle just vanish.