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