dots/pkgs/Fmt/flake.nix
Price Hiller bea2a0bac8
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 53s
style(nix): format with Fmt
2024-04-19 22:30:26 -05:00

43 lines
914 B
Nix

{
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
{
packages.default = pkgs.writeShellApplication {
name = "Fmt";
runtimeInputs = with pkgs; [
stylua
gnugrep
nixfmt-rfc-style
nodePackages.prettier
shfmt
];
text = (
''
#!${pkgs.bash}/bin/bash
''
+ builtins.readFile ./fmt.bash
);
};
}
)
// {
overlays.default = final: prev: { Fmt = self.packages.${final.system}.default; };
};
}