mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +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 "$@"
|
|
'');
|
|
};
|
|
}
|