-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
apptainer, singularity: format Nix expression according to Nix RFC 166 #306656
Conversation
6cc6d70
to
85d824c
Compare
Bump onto the master branch and resolve merge conflict. |
Add comment above "defaultToSuid = true" to explain it and to keep it multi-line after formatting.
Make the Nix expression generic.nix and package.nix conformant to Nix RFC 166.
85d824c
to
54e547f
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.
Do I understand correctly:
- The new revision doesn't include any manual edits, it's a fully automated reformatting.
- The custom nixfmt patches will eventually make their way into nixpkgs'
nixfmt-rfc-style
package?
Yes.
I manipulate the formatting result by adding comments to the Nix code. The formatter is fetched unmodified from the master branch of NixOS/nixfmt. For example, {
foo = [
"aaaa"
"bbbb"
]
++ lib.optional true "cccc"
++ lib.optional true "dddd";
} formats to {
foo = [
"aaaa"
"bbbb"
] ++ lib.optional true "cccc" ++ lib.optional true "dddd";
} while {
foo = [
"aaaa"
"bbbb"
]
# Optional dependencies
++ lib.optional true "cccc"
++ lib.optional true "dddd";
} formats to {
foo =
[
"aaaa"
"bbbb"
]
# Optional dependencies
++ lib.optional true "cccc"
++ lib.optional true "dddd";
} |
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.
Cool ! LGTM
Description of changes
Format
pkgs/applications/virtualization/singularity/{generic.nix,packages.nix}
andnixos/modules/programs/singularity.nix
with nixfmt to make them conform Nix RFC 166, providing a clean ground for subsequent changes.Prevent unwanted absorption by comments. See also NixOS/nixfmt#198.
Cc: @GaetanLepage @jbedo @SomeoneSerge
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.