mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
shell: Introduce treefmt
Introduces treefmt with a simple nixfmt-rfc-style configuration to format all Nix files. This is only practically usable with the following commit that formats all files accordingly.
This commit is contained in:
parent
02b2743b6a
commit
398e74f70b
2 changed files with 38 additions and 5 deletions
|
@ -16,7 +16,7 @@
|
|||
nixpkgs ? null,
|
||||
}:
|
||||
let
|
||||
inherit (import ./ci { inherit nixpkgs system; }) pkgs;
|
||||
inherit (import ./ci { inherit nixpkgs system; }) pkgs fmt;
|
||||
|
||||
# For `nix-shell -A hello`
|
||||
curPkgs = builtins.removeAttrs (import ./. { inherit system; }) [
|
||||
|
@ -28,10 +28,10 @@ let
|
|||
in
|
||||
curPkgs
|
||||
// pkgs.mkShellNoCC {
|
||||
inputsFrom = [
|
||||
fmt.shell
|
||||
];
|
||||
packages = with pkgs; [
|
||||
# The default formatter for Nix code
|
||||
# See https://github.com/NixOS/nixfmt
|
||||
nixfmt-rfc-style
|
||||
# Helper to review Nixpkgs PRs
|
||||
# See CONTRIBUTING.md
|
||||
nixpkgs-review
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue