mirror of
https://codeberg.org/icewind/flakelight-php.git
synced 2026-06-03 09:54:20 +02:00
phpunit app
This commit is contained in:
parent
a59a517f66
commit
d143b04ec3
4 changed files with 84 additions and 2 deletions
|
|
@ -111,6 +111,11 @@ in
|
|||
vendorHash = mkOption {
|
||||
type = with types; str;
|
||||
};
|
||||
testDependencies = mkOption {
|
||||
type = function;
|
||||
default = pkgs: [];
|
||||
description = "extra dependencies needed during testing";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
|
|
@ -123,6 +128,14 @@ in
|
|||
inherit (config) composerJson composerLock vendorHash;
|
||||
};
|
||||
|
||||
phpunit = final.callPackage ./apps/phpunit.nix {
|
||||
phpunit = final.callPackage ./pkgs/phpunit.nix {
|
||||
php = final.minPhp;
|
||||
majorVersion = composerMeta.phpUnitVersion;
|
||||
};
|
||||
testDependencies = config.testDependencies final;
|
||||
};
|
||||
|
||||
inherit composerMeta filteredSrc;
|
||||
inherit (final.minPhp.packages) php-cs-fixer composer psalm phpstan;
|
||||
})
|
||||
|
|
@ -156,12 +169,16 @@ in
|
|||
in
|
||||
(optionalAttrs hasPsalm (forPhpVersions "psalm" ./checks/psalm.nix))
|
||||
// (optionalAttrs hasPhpStan (forPhpVersions "phpstan" ./checks/phpstan.nix));
|
||||
|
||||
apps = {pkgs, ...}: {
|
||||
phpunit = ''${getExe pkgs.phpunit} "$@"'';
|
||||
};
|
||||
})
|
||||
|
||||
{
|
||||
devShells = {
|
||||
default = {
|
||||
packages = pkgs: (config.tools pkgs) ++ (with pkgs; [minPhp php-cs-fixer composer psalm phpstan]);
|
||||
packages = pkgs: (config.tools pkgs) ++ (with pkgs; [minPhp php-cs-fixer composer psalm phpstan phpunit]);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue