mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-04 19:16:13 +01:00
65 lines
1.2 KiB
Nix
65 lines
1.2 KiB
Nix
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
let
|
|
php = pkgs.php83.buildEnv {
|
|
extensions = { enabled, all }: enabled ++ (with all; [
|
|
xdebug
|
|
]);
|
|
|
|
extraConfig = ''
|
|
xdebug.mode = debug
|
|
memory_limit = 4G
|
|
'';
|
|
};
|
|
inherit(php.packages) composer;
|
|
|
|
projectInstall = pkgs.writeShellApplication {
|
|
name = "project-install";
|
|
runtimeInputs = [
|
|
php
|
|
composer
|
|
];
|
|
text = ''
|
|
rm -rf .Build/ vendor/ composer.lock
|
|
composer update --prefer-dist --no-progress --working-dir="$PROJECT_ROOT"
|
|
'';
|
|
};
|
|
|
|
projectCgl = pkgs.writeShellApplication {
|
|
name = "project-cgl";
|
|
|
|
runtimeInputs = [
|
|
php
|
|
];
|
|
|
|
text = ''
|
|
PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run --diff
|
|
'';
|
|
};
|
|
|
|
projectCglFix = pkgs.writeShellApplication {
|
|
name = "project-cgl-fix";
|
|
|
|
runtimeInputs = [
|
|
php
|
|
];
|
|
|
|
text = ''
|
|
PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix
|
|
'';
|
|
};
|
|
|
|
in pkgs.mkShellNoCC {
|
|
name = "TYPO3 Extension ThüCAT";
|
|
buildInputs = [
|
|
php
|
|
composer
|
|
projectInstall
|
|
projectCgl
|
|
projectCglFix
|
|
];
|
|
|
|
shellHook = ''
|
|
export PROJECT_ROOT="$(pwd)"
|
|
'';
|
|
}
|