Skip to content

Commit

Permalink
Fix shellcheck issue in check script
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed Apr 15, 2024
1 parent 4a341f8 commit 7c3ef7b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,25 @@
text = "nixpkgs-fmt '**/*.nix'";
};

check = final.writeShellApplication {
name = "check";
# only run this locally, as Actions will run out of disk space
build = final.writeShellApplication {
name = "build";
text = ''
SYSTEM=$(nix eval --impure --raw --expr 'builtins.currentSystem')
for dir in */; do # Iterate through all the templates
(
cd "''${dir}"
nix build ".#devShells.''${SYSTEM}.default"
)
done
'';
};

check = final.writeShellApplication {
name = "check";
text = ''
for dir in */; do # Iterate through all the templates
(
cd "''${dir}"
Expand Down Expand Up @@ -73,7 +87,7 @@
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ check format update ];
packages = with pkgs; [ build check format update ];
};
});

Expand Down

0 comments on commit 7c3ef7b

Please sign in to comment.