videocutting/shell.nix

45 lines
699 B
Nix

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