Something went wrong. Try again.
A small, fast, drop-in replacement for git-hooks.nix
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637{ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs, ... }: let systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system}); withHooks = import ./with-hooks.nix {inherit nixpkgs;}; in withHooks { hooks = forAllSystems (system: pkgs: { inherit (self.lib.${system}.presets) commitlint; settings = { parallel = true; tangled.enable = true; }; } // pkgs.lib.mapAttrs (_: h: h {stages = ["pre-push"];}) { inherit (self.lib.${system}.presets) shellcheck alejandra bats shfmt deadnix statix; });
devShells = forAllSystems (_: pkgs: { default = pkgs.mkShell { packages = [pkgs.shfmt pkgs.alejandra pkgs.bats]; }; });
lib = forAllSystems (_: pkgs: import ./lib {inherit pkgs;}) // {inherit withHooks;}; };}