Add ptest to run and watch PHP tests
All checks were successful
/ check (push) Successful in 1m37s

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-09-24 02:04:46 +01:00
parent a74ee06ec3
commit 4f53f5de75
2 changed files with 69 additions and 15 deletions

View file

@ -1,23 +1,35 @@
{ withSystem, ... }:
let
name = "onchange";
in
{
perSystem =
{ pkgs, ... }:
with pkgs;
{
packages.${name} = writeShellApplication {
inherit name;
runtimeInputs = [
coreutils
entr
];
text = ''
PATTERN="$1"
shift 1
find . -path "$PATTERN" -type f | entr -cs "$@"
'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "onchange";
runtimeInputs = with pkgs; [
coreutils
entr
];
text = ''
PATTERN="$1"
shift 1
find . -path "$PATTERN" -type f | entr -cs "$@"
'';
})
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}