Skip to content

Commit

Permalink
Merge pull request #66 from akirak/pre-commit-self-src
Browse files Browse the repository at this point in the history
Add a phantom flake input to refer to the parent source for running checks from the subflake
  • Loading branch information
akirak authored Dec 3, 2023
2 parents 7ff8be5 + d442ec7 commit d282f7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- run: nix flake check ./dev
- run: nix flake check ./dev -L --override-input src path:.
4 changes: 3 additions & 1 deletion dev/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
# To be overridden during execution
src.url = "github:akirak/flake-templates";
};

outputs = {
Expand All @@ -20,7 +22,7 @@

checks = eachSystem (system: {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
src = inputs.src.outPath;
hooks = {
actionlint.enable = true;
alejandra.enable = true;
Expand Down

0 comments on commit d282f7c

Please sign in to comment.