mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 01:31:39 -05:00
37 lines
736 B
Nix
37 lines
736 B
Nix
{ pkgs, ... }: {
|
|
# Used to find the project root
|
|
projectRootFile = "flake.lock";
|
|
|
|
settings.formatter = {
|
|
nix = {
|
|
command = "sh";
|
|
options = [
|
|
"-eucx"
|
|
''
|
|
${pkgs.lib.getExe pkgs.deadnix} --edit "$@"
|
|
|
|
for i in "$@"; do
|
|
${pkgs.lib.getExe pkgs.statix} fix "$i"
|
|
done
|
|
|
|
${pkgs.lib.getExe pkgs.nixpkgs-fmt} "$@"
|
|
''
|
|
"--"
|
|
];
|
|
includes = [ "*.nix" ];
|
|
excludes = [ ];
|
|
};
|
|
|
|
python = {
|
|
command = "sh";
|
|
options = [
|
|
"-eucx"
|
|
''
|
|
${pkgs.lib.getExe pkgs.python3.pkgs.black} "$@"
|
|
''
|
|
"--" # this argument is ignored by bash
|
|
];
|
|
includes = [ "*.py" ];
|
|
};
|
|
};
|
|
}
|