From 83e3724538d1d71d609552fd078f89d1a1b82c4d Mon Sep 17 00:00:00 2001 From: misuzu Date: Sat, 7 Dec 2024 18:30:20 +0200 Subject: [PATCH] writeShellApplication: fix shellcheck availability check This fixes NixOS evaluation for native riscv64-linux --- pkgs/build-support/trivial-builders/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 12a40a2d9602..65685d44c75f 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -299,7 +299,7 @@ rec { # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v) # but we still want to use writeShellApplication on those platforms let - shellcheckSupported = lib.meta.availableOn stdenv.buildPlatform shellcheck-minimal.compiler; + shellcheckSupported = lib.meta.availableOn stdenv.buildPlatform shellcheck-minimal.compiler && (builtins.tryEval shellcheck-minimal.compiler.outPath).success; excludeFlags = lib.optionals (excludeShellChecks != [ ]) [ "--exclude" (lib.concatStringsSep "," excludeShellChecks) ]; shellcheckCommand = lib.optionalString shellcheckSupported '' # use shellcheck which does not include docs