nix-info: use checkInputs

This commit is contained in:
Jan Malakhovski 2018-08-08 21:40:01 +00:00
parent 75993b0f93
commit ff4b82c966

View file

@ -1,15 +1,12 @@
{ stdenv, lib, coreutils, findutils, gnugrep, darwin, shellcheck
, doCheck ? false # Avoid having GHC in the build-time closure of all NixOS configuratinos
{ stdenv, lib, coreutils, findutils, gnugrep, darwin
# Avoid having GHC in the build-time closure of all NixOS configurations
, doCheck ? false, shellcheck
}:
stdenv.mkDerivation {
name = "nix-info";
src = ./info.sh;
nativeBuildInputs = lib.optionals doCheck [
shellcheck
];
path = lib.makeBinPath ([
coreutils findutils gnugrep
] ++ (if stdenv.isDarwin then [ darwin.DarwinTools ] else []));
@ -29,6 +26,8 @@ stdenv.mkDerivation {
'';
inherit doCheck;
checkInputs = [ shellcheck ];
checkPhase = ''
shellcheck ./nix-info
'';