mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #264684 from ShamrockLee/shellcheck-minimal
This commit is contained in:
commit
59ff987fed
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, stdenvNoCC, lndir, runtimeShell, shellcheck, haskell }:
|
||||
{ lib, stdenv, stdenvNoCC, lndir, runtimeShell, shellcheck-minimal }:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
@ -365,12 +365,12 @@ 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.compiler;
|
||||
shellcheckSupported = lib.meta.availableOn stdenv.buildPlatform shellcheck-minimal.compiler;
|
||||
excludeOption = lib.optionalString (excludeShellChecks != [ ]) "--exclude '${lib.concatStringsSep "," excludeShellChecks}'";
|
||||
shellcheckCommand = lib.optionalString shellcheckSupported ''
|
||||
# use shellcheck which does not include docs
|
||||
# pandoc takes long to build and documentation isn't needed for just running the cli
|
||||
${lib.getExe (haskell.lib.compose.justStaticExecutables shellcheck.unwrapped)} ${excludeOption} "$target"
|
||||
${lib.getExe shellcheck-minimal} ${excludeOption} "$target"
|
||||
'';
|
||||
in
|
||||
if checkPhase == null then ''
|
||||
|
@ -20096,6 +20096,12 @@ with pkgs;
|
||||
inherit (__splicedPackages.haskellPackages) ShellCheck;
|
||||
};
|
||||
|
||||
|
||||
# Minimal shellcheck executable for package checks.
|
||||
# Use shellcheck which does not include docs, as
|
||||
# pandoc takes long to build and documentation isn't needed for just running the cli
|
||||
shellcheck-minimal = haskell.lib.compose.justStaticExecutables shellcheck.unwrapped;
|
||||
|
||||
shellharden = callPackage ../development/tools/shellharden { };
|
||||
|
||||
schemaspy = callPackage ../development/tools/database/schemaspy { };
|
||||
|
@ -110,8 +110,8 @@ let
|
||||
trivialBuilders = self: super:
|
||||
import ../build-support/trivial-builders {
|
||||
inherit lib;
|
||||
inherit (self) runtimeShell stdenv stdenvNoCC haskell;
|
||||
inherit (self.pkgsBuildHost) shellcheck;
|
||||
inherit (self) runtimeShell stdenv stdenvNoCC;
|
||||
inherit (self.pkgsBuildHost) shellcheck-minimal;
|
||||
inherit (self.pkgsBuildHost.xorg) lndir;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user