videocutting/shell.nix
Daniel Siepmann c9f9c6fc7b
Update all dependencies
* PHP
* Symfony
* PHPUnit

Add PHPStan to better detect issues while updating.
2025-03-19 11:18:07 +01:00

60 lines
921 B
Nix

{ pkgs ? import <nixpkgs> { } }:
let
php = pkgs.php84;
inherit(pkgs.php84Packages) composer;
projectInstall = pkgs.writeShellApplication {
name = "project-install";
runtimeInputs = [
composer
];
text = ''
composer install
project-test
'';
};
projectUpdate = pkgs.writeShellApplication {
name = "project-update";
runtimeInputs = [
composer
];
text = ''
composer update --with-all-dependencies
project-test
'';
};
projectTest = pkgs.writeShellApplication {
name = "project-test";
runtimeInputs = [
php
];
text = ''
./vendor/bin/phpunit
./vendor/bin/phpstan
'';
};
in pkgs.mkShellNoCC {
name = "Videocutting";
buildInputs = [
pkgs.ffmpeg
php
composer
projectInstall
projectUpdate
projectTest
];
shellHook = ''
export PATH="$(pwd)/:$PATH"
'';
}