From 4269cf2fbb2d3260d920d005a0369fde8e4ba047 Mon Sep 17 00:00:00 2001 From: talyz Date: Sat, 13 Nov 2021 14:37:18 +0100 Subject: [PATCH] ci: Use nix-shell instead of nix run Since the release of Nix 2.4, the ci pipeline is broken, as the syntax and behavior of nix run changed. The command is also considered experimental. Switch to using nix-shell instead. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d689c8..cb74d26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Check Nix formatting run: | - nix run nixpkgs.nixpkgs-fmt -c nixpkgs-fmt --check . + nix-shell -p nixpkgs-fmt --run "nixpkgs-fmt --check ." shell_formatting: runs-on: ubuntu-latest steps: @@ -28,7 +28,7 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Check shell script formatting run: | - find . -name "*.*sh" -exec nix run nixpkgs.shfmt -c shfmt -i 4 -d {} + + find . -name "*.*sh" -exec nix-shell -p shfmt --run "shfmt -i 4 -d {}" \; shell_error_checking: runs-on: ubuntu-latest steps: @@ -38,4 +38,4 @@ jobs: nix_path: nixpkgs=channel:nixos-unstable - name: Check for shell script errors run: | - find . -name "*.*sh" -exec nix run nixpkgs.shellcheck -c shellcheck {} + + find . -name "*.*sh" -exec nix-shell -p shellcheck --run "shellcheck {}" \;