dots/pkgs/Fmt/flake.nix

43 lines
914 B
Nix
Raw Normal View History

{
description = "Flake for custom formatting script";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
2024-04-19 22:27:46 -05:00
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
2024-04-19 22:24:13 -05:00
nixfmt-rfc-style
nodePackages.prettier
shfmt
];
2024-04-19 22:27:46 -05:00
text = (
''
#!${pkgs.bash}/bin/bash
''
+ builtins.readFile ./fmt.bash
);
};
2024-04-19 22:27:46 -05:00
}
)
// {
overlays.default = final: prev: { Fmt = self.packages.${final.system}.default; };
};
}