From 5145c8689c89b7f9a6d3fa882aec27082f5aa921 Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Thu, 31 Oct 2024 17:05:39 +0000 Subject: [PATCH] build: fix pre-commit installation on the nix-shell Signed-off-by: Tiago Castro --- nix/shell/ci.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/shell/ci.nix b/nix/shell/ci.nix index 616b5d8..d8d8505 100644 --- a/nix/shell/ci.nix +++ b/nix/shell/ci.nix @@ -1,6 +1,6 @@ { pkgs }: let - inPureNixShell = builtins.getEnv "IN_NIX_SHELL" == "pure"; + nixShellPurity = builtins.getEnv "IN_NIX_SHELL"; in { buildInputs = with pkgs; [ @@ -8,7 +8,7 @@ in ]; shellHook = '' - if [ -z "$CI" ] && [ "${toString inPureNixShell}" == "0" ]; then + if [ -z "$CI" ] && [ "${nixShellPurity}" == "impure" ]; then echo "Installing CI pre-commit hooks..." pre-commit install pre-commit install --hook commit-msg