2023-02-11 17:47:40 +01:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
|
2023-02-16 16:54:39 +01:00
|
|
|
let
|
2023-06-11 17:04:44 +02:00
|
|
|
php = pkgs.php82;
|
|
|
|
inherit(pkgs.php82Packages) composer;
|
|
|
|
|
2023-02-16 16:54:39 +01:00
|
|
|
projectInstall = pkgs.writeShellApplication {
|
|
|
|
name = "project-install";
|
|
|
|
|
|
|
|
runtimeInputs = [
|
2023-06-11 17:04:44 +02:00
|
|
|
composer
|
2023-02-16 16:54:39 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
text = ''
|
|
|
|
composer install
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-06-11 17:04:44 +02:00
|
|
|
projectUpdate = pkgs.writeShellApplication {
|
|
|
|
name = "project-update";
|
|
|
|
|
|
|
|
runtimeInputs = [
|
|
|
|
composer
|
|
|
|
];
|
|
|
|
|
|
|
|
text = ''
|
|
|
|
composer update --with-all-dependencies
|
|
|
|
./vendor/bin/phpunit
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-02-16 16:54:39 +01:00
|
|
|
in pkgs.mkShell {
|
2023-02-11 17:47:40 +01:00
|
|
|
name = "Videocutting";
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.ffmpeg
|
2023-06-11 17:04:44 +02:00
|
|
|
php
|
|
|
|
composer
|
2023-02-16 16:54:39 +01:00
|
|
|
projectInstall
|
2023-06-11 17:04:44 +02:00
|
|
|
projectUpdate
|
2023-02-11 17:47:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
export PATH="$(pwd)/:$PATH"
|
|
|
|
'';
|
|
|
|
}
|