Skip to content
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

[Backport release-24.05] Development shell with a pinned nixfmt #326630

Merged
merged 6 commits into from
Jul 15, 2024

Conversation

infinisil
Copy link
Member

Description of changes

Manual backport of #322512

Things done


Add a 👍 reaction to pull requests you find important.

@superherointj
Copy link
Contributor

As I have merged #326628, this needs a re-base for CI to run fine.
(And I don't know how to do that with your PR.)

@superherointj
Copy link
Contributor

@infinisil Can you rebase this PR (to attempt to solve CI)?

This creates a new directory for all CI support files, will be populated
in future commits.

(cherry picked from commit 1359993)
This is needed such that in the next commit, we can re-use the same
version from a shell.nix, allowing people to have a guaranteed matching
nixfmt version.

(cherry picked from commit b33ac05)
This uses the reusable pinned Nixpkgs from the parent commit to create a
shell.nix file for an environment with a pinned nixfmt version.

(cherry picked from commit a70ab58)
When some files are not formatted properly, this shows how people can
fix the problem.

This notably uses the shell.nix introduced in the parent commit to
ensure that the nixfmt version matches what CI expects.

(cherry picked from commit 53b517c)
Otherwise it prints the command to run with an empty entry:

  nixfmt '<stuff>' ''

Thanks to https://yaml-multiline.info/ for the great help with this

(cherry picked from commit d0bebb7)
@superherointj superherointj merged commit 4be33c4 into NixOS:release-24.05 Jul 15, 2024
20 of 22 checks passed
@infinisil infinisil deleted the backport-322512 branch July 17, 2024 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants