2023-04-11 15:12:51 +02:00
|
|
|
{
|
|
|
|
pkgs ? import <nixpkgs> { }
|
|
|
|
,phps ? import <phps>
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-02-05 15:51:10 +01:00
|
|
|
php = phps.packages.x86_64-linux.php83;
|
2023-04-11 15:12:51 +02:00
|
|
|
inherit(php.packages) composer;
|
|
|
|
|
|
|
|
phpWithXdebug = php.buildEnv {
|
|
|
|
extensions = { enabled, all }: enabled ++ (with all; [
|
|
|
|
xdebug
|
|
|
|
]);
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
xdebug.mode = debug
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
projectInstall = pkgs.writeShellApplication {
|
|
|
|
name = "project-install";
|
|
|
|
runtimeInputs = [
|
|
|
|
php
|
|
|
|
composer
|
|
|
|
];
|
|
|
|
text = ''
|
2023-05-11 10:48:41 +02:00
|
|
|
composer update --prefer-dist --no-progress
|
2023-04-11 15:12:51 +02:00
|
|
|
'';
|
|
|
|
};
|
2023-04-12 12:05:53 +02:00
|
|
|
projectCgl = pkgs.writeShellApplication {
|
|
|
|
name = "project-cgl";
|
|
|
|
runtimeInputs = [
|
|
|
|
php
|
|
|
|
];
|
|
|
|
text = ''
|
|
|
|
./vendor/bin/php-cs-fixer fix --diff
|
|
|
|
'';
|
|
|
|
};
|
2023-04-11 15:12:51 +02:00
|
|
|
|
|
|
|
in pkgs.mkShell {
|
|
|
|
name = "TYPO3 PHP Datasets";
|
|
|
|
buildInputs = [
|
|
|
|
projectInstall
|
2023-04-12 12:05:53 +02:00
|
|
|
projectCgl
|
2023-04-11 15:12:51 +02:00
|
|
|
phpWithXdebug
|
|
|
|
composer
|
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
export typo3DatabaseDriver=pdo_sqlite
|
|
|
|
'';
|
|
|
|
}
|