2024-03-16 15:21:25 -05:00
|
|
|
{
|
|
|
|
description = "Flake for custom formatting script";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
2024-03-20 14:13:44 -05:00
|
|
|
packages.default = pkgs.writeShellApplication {
|
|
|
|
name = "Fmt";
|
|
|
|
runtimeInputs = with pkgs; [
|
|
|
|
stylua
|
|
|
|
gnugrep
|
|
|
|
nixfmt
|
|
|
|
nodePackages.prettier
|
|
|
|
shfmt
|
|
|
|
];
|
|
|
|
text = (''
|
|
|
|
#!${pkgs.bash}/bin/bash
|
|
|
|
'' + builtins.readFile ./fmt.bash);
|
|
|
|
};
|
2024-03-16 15:21:25 -05:00
|
|
|
}) // {
|
|
|
|
overlays.default = final: prev: {
|
|
|
|
Fmt = self.packages.${final.system}.default;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|