home-assistant: 2025.8.0 -> 2025.8.1#432915
Conversation
|
|
| @@ -1,5 +1,5 @@ | |||
| #! /usr/bin/env nix-shell | |||
| #! nix-shell -i python3 -p "python3.withPackages (ps: with ps; [ packaging rich ])" -p pyright ruff isort | |||
| #! nix-shell -i python3 -p "python3.withPackages (ps: with ps; [ packaging rich ])" -p pyright ruff isort nixfmt | |||
There was a problem hiding this comment.
It did not find nixfmt, when I ran it. That's why I added it back. I'm not manually attaching to the shell in the repo root, if that's what you're asking.
There was a problem hiding this comment.
I'm not manually attaching to the shell in the repo root, if that's what you're asking.
Unfortunately, that's what we need to expect, though. You'd either need to enter nix-shell manually or have direnv set up.
That's because nixfmt only works by accident, because it doesn't have configuration (right now). As soon as we have configuration for it, which happens via treefmt-nix, a nixfmt (or nixfmt-rfc-style) that you get directly from whatever nixpkgs this update script takes packages from... it would result in different formatting results.
There was a problem hiding this comment.
Maybe... you can replace nixfmt with nix fmt? This should also work outside nix-shell, although only with the new CLI. So maybe with the enable-experimental-features flag?
There was a problem hiding this comment.
or have direnv set up.
whats' the reason for letting everyone do this on their own instead of adding it to nixpkgs directly?
There was a problem hiding this comment.
I don't know. There is #325793 which added the file to .gitignore. I didn't read through it, but it refers to some other issues / PRs.. I assume this would have been controversial? Dunno.
I think it should really be set up by default. It's annoying to have to do it manually. If you're not running direnv, it won't bother you anyway.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.