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