-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add keep-sorted workflow; format and sort top-level/python-packages.nix #391087
Conversation
0bbc741
to
6c66651
Compare
6c66651
to
7d938c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
7d938c7
to
e7e4f67
Compare
e7e4f67
to
a9b37bf
Compare
ce86a99
to
9735ecf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I hope that we can migrate all lists of packages to something like pkgs/by-name
, but for now this looks like a good alternative.
LGTM, I'll merge!
Oh, conflict to resolve. It would also be good to add the formatting commit to |
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
9735ecf
to
afc776a
Compare
Yes, getting this in without a conflict isn't easy. 😅 |
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
afc776a
to
fd14c06
Compare
I hope we can do so, but keep-sorted can do much more! It can sort markdown tables, large lists of buildInputs, ... |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.11
git worktree add -d .worktree/backport-391087-to-release-24.11 origin/release-24.11
cd .worktree/backport-391087-to-release-24.11
git switch --create backport-391087-to-release-24.11
git cherry-pick -x 5f6f5e13ae0b6960cbf1be8aeb3d0048285a08d1 cb755af53647e28dd54d576c074ac8de7ad6fc73 60b30dd3164e656eb5ca049064781d14999fc77c 3b0f56da6197c20bbd56132654a9a1a424ddf743 fd14c067813572afc03ddbf7cdedc3eab5a59954 |
We should do a manual backport as well to avoid merge conflicts when backporting python packages. |
|
||
# python-packages: format with nixfmt-rfc-style | ||
5f6f5e13ae0b6960cbf1be8aeb3d0048285a08d1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add fd14c06, i.e. the sorting commit, here, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #392717
keep-sorted is a language-agnostic formatter that sorts lines between two markers in a larger file.
This is a first step to use keep-sorted to enforce sorting in nixpkgs, adding a CI job and sorting python-packages.nix (as it had a quite uniform structure already). The nixfmt format comes in handy here, as the way blocks are formatted make it really easy for keep-sorted.
As the workflow has pull_request_target trigger, it won't run on this PR, I've tested it on my fork: https://github.com/katexochen/nixpkgs/actions/runs/13934128359/job/38998162445?pr=1
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.