nix: format test fixtures via nix fmt
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia9c1e9b0a8cd9c6d834f153609baa5426a6a6964
This commit is contained in:
parent
e8dd09c5b4
commit
b49044c9a5
15 changed files with 132 additions and 73 deletions
19
flake.nix
19
flake.nix
|
|
@ -4,9 +4,10 @@
|
|||
outputs = {nixpkgs, ...}: let
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = pkgsFor system;
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
name = "nixir";
|
||||
|
|
@ -34,5 +35,21 @@
|
|||
env.NIX_PLUGINABI = "0.2";
|
||||
};
|
||||
});
|
||||
|
||||
formatter = forAllSystems (system: let
|
||||
pkgs = pkgsFor 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