Improve shell (#12)

Allow project installation.
Re-Use PHP and composer and expose them.
This commit is contained in:
Daniel Siepmann 2023-07-24 14:37:26 +02:00 committed by GitHub
parent 52226fa3a2
commit 738cf3da7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,13 @@
{ pkgs ? import <nixpkgs> { } }:
let
php = pkgs.php81;
composer = pkgs.php81Packages.composer;
projectInstall = pkgs.writeShellApplication {
name = "project-install";
runtimeInputs = [
pkgs.php81
pkgs.php81Packages.composer
composer
];
text = ''
composer install --prefer-dist --no-progress --working-dir="$PROJECT_ROOT"
@ -14,8 +16,7 @@ let
projectValidateComposer = pkgs.writeShellApplication {
name = "project-validate-composer";
runtimeInputs = [
pkgs.php81
pkgs.php81Packages.composer
composer
];
text = ''
composer validate
@ -39,7 +40,7 @@ let
projectCodingGuideline = pkgs.writeShellApplication {
name = "project-coding-guideline";
runtimeInputs = [
pkgs.php81
php
projectInstall
];
text = ''
@ -54,7 +55,7 @@ let
pkgs.sqlite
pkgs.firefox
pkgs.geckodriver
pkgs.php81
php
];
text = ''
project-install
@ -69,6 +70,9 @@ let
in pkgs.mkShell {
name = "TYPO3 Extension Watchlist";
buildInputs = [
php
composer
projectInstall
projectValidateComposer
projectValidateXml
projectCodingGuideline