From 29357d8abd2fadaef54956cedcc7a037af571a8d Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 28 Aug 2023 15:37:43 +0200 Subject: [PATCH] Update shell.nix Use same setup as on other projects and expose php and composer to shell for development. --- shell.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/shell.nix b/shell.nix index 93976bb..613b42c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,14 +1,27 @@ { pkgs ? import { } }: let + php = pkgs.php82.buildEnv { + extensions = { enabled, all }: enabled ++ (with all; [ + xdebug + ]); + + extraConfig = '' + xdebug.mode = debug + memory_limit = 4G + ''; + }; + inherit(pkgs.php82Packages) composer; + projectInstall = pkgs.writeShellApplication { name = "project-install"; runtimeInputs = [ - pkgs.php82 - pkgs.php82Packages.composer + php + composer ]; text = '' - composer install --prefer-dist --no-progress --working-dir="$PROJECT_ROOT" + rm -rf .Build/ vendor/ composer.lock + composer update --prefer-dist --no-progress --working-dir="$PROJECT_ROOT" ''; }; projectTestAcceptance = pkgs.writeShellApplication { @@ -18,7 +31,7 @@ let pkgs.sqlite pkgs.firefox pkgs.geckodriver - pkgs.php82 + php ]; text = '' project-install @@ -34,6 +47,9 @@ let in pkgs.mkShell { name = "TYPO3 Extension ThüCAT"; buildInputs = [ + php + composer + projectInstall projectTestAcceptance ];