From 5e498f58826567eaa435194f282d052500d3667a Mon Sep 17 00:00:00 2001 From: Kodi Craft Date: Sun, 23 Jun 2024 01:50:36 +0200 Subject: [PATCH] Run clippy through nix now --- .gitea/workflows/build.yaml | 2 +- flake.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 05277e1..b69795d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -13,6 +13,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Run clippy - run: nix develop . -c cargo clippy --no-default-features --features ${{ matrix.feature }} + run: nix build .#clippy_${{ matrix.feature }} - name: Build & test run: nix build .#${{ matrix.feature }} \ No newline at end of file diff --git a/flake.nix b/flake.nix index d2d4613..d312c06 100644 --- a/flake.nix +++ b/flake.nix @@ -18,18 +18,33 @@ default = naersk-lib.buildPackage { src = ./.; doCheck = true; + mode = "test"; }; unix = naersk-lib.buildPackage { src = ./.; doCheck = true; cargoBuildOptions = x: x ++ ["--no-default-features" "--features" "unix"]; cargoTestOptions = x: x ++ ["--no-default-features" "--features" "unix"]; + mode = "test"; }; tcp = naersk-lib.buildPackage { src = ./.; doCheck = true; cargoBuildOptions = x: x ++ ["--no-default-features" "--features" "tcp"]; cargoTestOptions = x: x ++ ["--no-default-features" "--features" "tcp"]; + mode = "test"; + }; + clippy_unix = naersk-lib.buildPackage { + src = ./.; + cargoBuildOptions = x: x ++ ["--no-default-features" "--features" "unix"]; + cargoTestOptions = x: x ++ ["--no-default-features" "--features" "unix"]; + mode = "clippy"; + }; + clippy_tcp = naersk-lib.buildPackage { + src = ./.; + cargoBuildOptions = x: x ++ ["--no-default-features" "--features" "tcp"]; + cargoTestOptions = x: x ++ ["--no-default-features" "--features" "tcp"]; + mode = "clippy"; }; }; devShell = with pkgs; mkShell {