nixpkgs/home/packages/custom/build-phpactor/default.nix
Daniel Siepmann a10f010a43
Update phpactor
Also improve performance by ignoring diagnostics.
Remove unused files.
Shorten PATH setting.
Switching to PHP 82 as most recent version.
2023-02-14 08:29:04 +01:00

33 lines
712 B
Nix

{
writeShellApplication,
php82,
php82Packages,
git
}:
writeShellApplication {
name = "custom-build-phpactor";
runtimeInputs = [
php82
php82Packages.composer
git
];
# TODO: Use nix build environment?!
text = ''
rm -rf /tmp/phpactor
mkdir /tmp/phpactor
cd /tmp/phpactor
git clone --depth 1 https://github.com/phpactor/phpactor.git .
composer install -o --no-dev
version=$(git show -s --format=%H)
rm -rf .git/
cd /tmp
tar -czf "phpactor-$version.tar.gz" phpactor
rsync -vaz "phpactor-$version.tar.gz" daniel-siepmann.de:webs/daniel-siepmann.de/htdocs/public/fileadmin/
cd /tmp
rm -rf /tmp/phpactor "phpactor-$version.tar.gz"
'';
}