From 7c3ef7b734cc67b15f895ccf9b331b1b30ca2105 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 15 Apr 2024 17:15:36 -0300 Subject: [PATCH] Fix shellcheck issue in check script --- flake.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d67ae95..60f92b7 100644 --- a/flake.nix +++ b/flake.nix @@ -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}" @@ -73,7 +87,7 @@ { devShells = forEachSupportedSystem ({ pkgs }: { default = pkgs.mkShell { - packages = with pkgs; [ check format update ]; + packages = with pkgs; [ build check format update ]; }; });