mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-29 23:35:33 +03:00
18 lines
304 B
Nix
18 lines
304 B
Nix
{
|
|
perSystem = {
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
formatter = let
|
|
path = lib.makeBinPath [
|
|
pkgs.alejandra
|
|
pkgs.python3.pkgs.black
|
|
];
|
|
in (pkgs.writeScriptBin "format" ''
|
|
export PATH="${path}"
|
|
${pkgs.treefmt}/bin/treefmt --clear-cache "$@"
|
|
'');
|
|
};
|
|
}
|