mirror of
https://github.com/werkraum-media/calendar.git
synced 2024-12-06 14:56:10 +01:00
52 lines
990 B
Nix
52 lines
990 B
Nix
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
let
|
|
php = pkgs.php82.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 vendor/ .Build/
|
|
composer install --prefer-dist --no-progress --working-dir="$PROJECT_ROOT"
|
|
'';
|
|
};
|
|
|
|
projectValidateComposer = pkgs.writeShellApplication {
|
|
name = "project-validate-composer";
|
|
runtimeInputs = [
|
|
php
|
|
composer
|
|
];
|
|
text = ''
|
|
composer validate
|
|
'';
|
|
};
|
|
|
|
in pkgs.mkShell {
|
|
name = "TYPO3 Extension Watchlist";
|
|
buildInputs = [
|
|
projectInstall
|
|
projectValidateComposer
|
|
php
|
|
composer
|
|
];
|
|
|
|
shellHook = ''
|
|
export PROJECT_ROOT="$(pwd)"
|
|
|
|
export typo3DatabaseDriver=pdo_sqlite
|
|
'';
|
|
}
|