migrate php to nix

This commit is contained in:
Dan Vargas 2022-02-06 21:13:11 -07:00
parent dc2c5f3380
commit 3530a79a57
7 changed files with 27 additions and 30 deletions

View file

@ -26,4 +26,5 @@ args: {
"powershell" = import ./powershell.nix args;
"prolog" = import ./prolog.nix args;
"ponylang" = import ./ponylang.nix args;
"php" = import ./php.nix args;
}

26
runtimes/php.nix Normal file
View file

@ -0,0 +1,26 @@
{pkgs, piston, ...}:
let
pkg = pkgs.php;
in piston.mkRuntime {
language = "php";
version = pkg.version;
aliases = [];
run = ''
${pkg}/bin/php "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.php" = ''
OK
'';
};
args = [];
stdin = "";
packages = [];
main = "test.php";
})
];
}