mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-05 03:26:13 +01:00
Update shell.nix
Use same setup as on other projects and expose php and composer to shell for development.
This commit is contained in:
parent
4cb2b9ad80
commit
29357d8abd
1 changed files with 20 additions and 4 deletions
24
shell.nix
24
shell.nix
|
@ -1,14 +1,27 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
let
|
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 {
|
projectInstall = pkgs.writeShellApplication {
|
||||||
name = "project-install";
|
name = "project-install";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
pkgs.php82
|
php
|
||||||
pkgs.php82Packages.composer
|
composer
|
||||||
];
|
];
|
||||||
text = ''
|
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 {
|
projectTestAcceptance = pkgs.writeShellApplication {
|
||||||
|
@ -18,7 +31,7 @@ let
|
||||||
pkgs.sqlite
|
pkgs.sqlite
|
||||||
pkgs.firefox
|
pkgs.firefox
|
||||||
pkgs.geckodriver
|
pkgs.geckodriver
|
||||||
pkgs.php82
|
php
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
project-install
|
project-install
|
||||||
|
@ -34,6 +47,9 @@ let
|
||||||
in pkgs.mkShell {
|
in pkgs.mkShell {
|
||||||
name = "TYPO3 Extension ThüCAT";
|
name = "TYPO3 Extension ThüCAT";
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
php
|
||||||
|
composer
|
||||||
|
projectInstall
|
||||||
projectTestAcceptance
|
projectTestAcceptance
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue