From 623e69b7ca66fe27e754254cff227343fee27405 Mon Sep 17 00:00:00 2001 From: Norbert Melzer Date: Tue, 5 Apr 2022 17:27:49 +0200 Subject: [PATCH] add statix check --- checks/alejandra.nix | 2 +- checks/default.nix | 1 + checks/statix.nix | 9 +++++++++ packages/default.nix | 4 ++-- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 checks/statix.nix diff --git a/checks/alejandra.nix b/checks/alejandra.nix index 7edf9921..925bb1cf 100644 --- a/checks/alejandra.nix +++ b/checks/alejandra.nix @@ -4,5 +4,5 @@ self, }: runCommandNoCC "alejandra-run-${self.rev or "00000000"}" {} '' - ${alejandra}/bin/alejandra --check ${self} < /dev/null + ${alejandra}/bin/alejandra --check ${self} < /dev/null | tee $out '' diff --git a/checks/default.nix b/checks/default.nix index b750cb78..1a9f01f5 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -6,4 +6,5 @@ inputs: let callPackage = pkgs.lib.callPackageWith (pkgs // apkgs // spkgs // {inherit (inputs) self;}); in { alejandra = callPackage ./alejandra.nix {}; + statix = callPackage ./statix.nix {}; } diff --git a/checks/statix.nix b/checks/statix.nix new file mode 100644 index 00000000..e6b12f20 --- /dev/null +++ b/checks/statix.nix @@ -0,0 +1,9 @@ +{ + runCommandNoCC, + statix, + self, +}: +runCommandNoCC "statix-run-${self.rev or "00000000"}" {} '' + cd ${self} + ${statix}/bin/statix check -i packages/nodePackages/node-env.nix | tee $out +'' diff --git a/packages/default.nix b/packages/default.nix index 77593fbd..45ff7ba1 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -25,8 +25,8 @@ in { "angular" = nodePkgs."@angular/cli"; "switcher" = upkgs.callPackage ./switcher { - nix = inputs.nix.packages.x86_64-linux.nix; - home-manager = inputs.home-manager.packages.x86_64-linux.home-manager; + inherit (inputs.nix.packages.x86_64-linux) nix; + inherit (inputs.home-manager.packages.x86_64-linux) home-manager; }; "rnix-lsp" = inputs.rnix-lsp.defaultPackage.x86_64-linux; -- 2.51.2