typo3-php-datasets/shell.nix
Daniel Siepmann 65efed087a
Use composer update instead of install (#7)
There is no composer.lock within the project. Composer would raise a
notice when using composer install without a lock file.
2023-05-11 10:48:41 +02:00

52 lines
910 B
Nix

{
pkgs ? import <nixpkgs> { }
,phps ? import <phps>
}:
let
php = phps.packages.x86_64-linux.php81;
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 = ''
composer update --prefer-dist --no-progress
'';
};
projectCgl = pkgs.writeShellApplication {
name = "project-cgl";
runtimeInputs = [
php
];
text = ''
./vendor/bin/php-cs-fixer fix --diff
'';
};
in pkgs.mkShell {
name = "TYPO3 PHP Datasets";
buildInputs = [
projectInstall
projectCgl
phpWithXdebug
composer
];
shellHook = ''
export typo3DatabaseDriver=pdo_sqlite
'';
}