nix: make default formatter a multi-file wrapper
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I2cec885c77bdb5cc5dc9ca8bc7a25e2a6a6a6964
This commit is contained in:
parent
0dc09dbd19
commit
80fece6fa8
1 changed files with 16 additions and 1 deletions
17
flake.nix
17
flake.nix
|
|
@ -94,6 +94,7 @@
|
||||||
features = pkgs.callPackage ./nix/tests/features.nix {inherit self;};
|
features = pkgs.callPackage ./nix/tests/features.nix {inherit self;};
|
||||||
webhooks = pkgs.callPackage ./nix/tests/webhooks.nix {inherit self;};
|
webhooks = pkgs.callPackage ./nix/tests/webhooks.nix {inherit self;};
|
||||||
e2e = pkgs.callPackage ./nix/tests/e2e.nix {inherit self;};
|
e2e = pkgs.callPackage ./nix/tests/e2e.nix {inherit self;};
|
||||||
|
declarative = pkgs.callPackage ./nix/tests/declarative.nix {inherit self;};
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = forAllSystems (system: let
|
devShells = forAllSystems (system: let
|
||||||
|
|
@ -115,6 +116,20 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
formatter = forAllSystems (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = "nix3-fmt-wrapper";
|
||||||
|
|
||||||
|
runtimeInputs = [
|
||||||
|
pkgs.alejandra
|
||||||
|
pkgs.fd
|
||||||
|
];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
fd "$@" -t f -e nix -x alejandra -q '{}'
|
||||||
|
'';
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue