Closed getchoo closed 4 months ago
IMO we should probably drop that option entirely from a tool that is about updating packages since those changes also most of the time should get their own commit.
i personally use this a lot to make sure that any changes i've (or nix-update) have made are still inline with the previous styling. i've been doing this less lately mainly because it's still using nixpkgs-fmt
i think it may be nice to have an option for a separate format commit, though - as that would be more inline with what we should be doing
@mergify queue
queue
IMO we should probably drop that option entirely from a tool that is about updating packages since those changes also most of the time should get their own commit.
I think that's too late now. I feel like already too many people depend on it: https://github.com/Mic92/nix-update/issues/253
IMO we should probably drop that option entirely from a tool that is about updating packages since those changes also most of the time should get their own commit.
I think that's too late now. I feel like already too many people depend on it: #253
I created the issue because nix-update
was depending on nixpkgs-fmt
, I think removing --format
is a good idea.
@mergify rebase
rebase
$ nixfmt /var/lib/github-actions-runners/raisin-default/work/nixcfg/nixcfg/pkgs/alacritty/default.nix
Traceback (most recent call last):
File "/nix/store/kjknpmby5d3ff565aq7ldmklzr2pxfx8-nix-update-1.0.0/bin/.nix-update-wrapped", line 9, in <module>
sys.exit(main())
^^^^^^
File "/nix/store/kjknpmby5d3ff565aq7ldmklzr2pxfx8-nix-update-1.0.0/lib/python3.11/site-packages/nix_update/__init__.py", line 329, in main
run(["nixfmt", package.filename], stdout=None)
File "/nix/store/kjknpmby5d3ff565aq7ldmklzr2pxfx8-nix-update-1.0.0/lib/python3.11/site-packages/nix_update/utils.py", line 37, in run
return subprocess.run(
^^^^^^^^^^^^^^^
File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/6b1fqdwb3g56j5pazv8zkx9qd0mv3wiz-python3-3.11.9/lib/python3.11/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nixfmt'
I get this recently, seems related to this PR.
FileNotFoundError: [Errno 2] No such file or directory: 'nixfmt'
You might need nixfmt in your $PATH
sure, nixfmt
docs say its in nixpkgs, but it's not. So I guess I'll go hunt the derivation name.
I guess it's nixfmt-rfc-style
. Thanks.
following rfc 166, nixfmt is now the official formatter for nix and slowing becoming more commonplace in both nixpkgs and the community. though it isn't stable just yet, i think it might be good to start using it sooner rather than later