From dbc26c72e6c7de7c8737154f47df6da7c760efd3 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 10 Jun 2022 13:48:42 -0700 Subject: ci(default): add `apps.ci.shellcheck` to flake.nix I can now run `nix run .#ci.shellcheck` to validate the shell scripts with shellcheck in the repository. The pipeline in buildKite will need to be updated. Change-Id: Ia52ede86adfa58c9615b0f9e290ef5d5b8adb303 Reviewed-on: https://cl.fcuny.net/c/world/+/409 Tested-by: CI Reviewed-by: Franck Cuny --- flake.nix | 7 +++++-- ops/ci/default.nix | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 ops/ci/default.nix diff --git a/flake.nix b/flake.nix index c5be2b6..6f1d036 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,7 @@ let pkgs = import inputs.nixpkgs { inherit system; }; home-manager = inputs.home-manager.defaultPackage."${system}"; - ci = import ./ops/ci/fmt.nix { inherit pkgs; }; + ci = import ./ops/ci { inherit pkgs; }; in { packages = pkgs // { @@ -61,7 +61,10 @@ }; # `nix run .#ci.format` formats in current directory! - apps.ci.format = ci.mkFmtScript self; + apps.ci.format = ci.fmt.mkFmtScript self; + + # `nix run .#ci.shellcheck` formats in current directory! + apps.ci.shellcheck = ci.shell.mkShellCheckScript self; devShell = pkgs.mkShell { buildInputs = with pkgs; [ diff --git a/ops/ci/default.nix b/ops/ci/default.nix new file mode 100644 index 0000000..be0c607 --- /dev/null +++ b/ops/ci/default.nix @@ -0,0 +1,6 @@ +{ pkgs }: + +{ + fmt = import ./fmt.nix pkgs; + shell = import ./shellcheck.nix pkgs; +} -- cgit 1.4.1