2022-09-16 09:50:20 +02:00
|
|
|
{
|
|
|
|
writeShellApplication,
|
2023-02-14 08:29:04 +01:00
|
|
|
php82,
|
|
|
|
php82Packages,
|
2022-09-16 09:50:20 +02:00
|
|
|
git
|
|
|
|
}:
|
|
|
|
|
|
|
|
writeShellApplication {
|
|
|
|
name = "custom-build-phpactor";
|
|
|
|
|
|
|
|
runtimeInputs = [
|
2023-02-14 08:29:04 +01:00
|
|
|
php82
|
|
|
|
php82Packages.composer
|
2022-09-16 09:50:20 +02:00
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
# TODO: Use nix build environment?!
|
|
|
|
text = ''
|
2022-10-11 15:12:55 +02:00
|
|
|
rm -rf /tmp/phpactor
|
|
|
|
mkdir /tmp/phpactor
|
|
|
|
cd /tmp/phpactor
|
2022-09-16 09:50:20 +02:00
|
|
|
git clone --depth 1 https://github.com/phpactor/phpactor.git .
|
|
|
|
composer install -o --no-dev
|
|
|
|
version=$(git show -s --format=%H)
|
2022-09-26 15:26:10 +02:00
|
|
|
rm -rf .git/
|
2022-09-16 09:50:20 +02:00
|
|
|
cd /tmp
|
2022-10-11 15:12:55 +02:00
|
|
|
tar -czf "phpactor-$version.tar.gz" phpactor
|
2022-09-16 09:50:20 +02:00
|
|
|
rsync -vaz "phpactor-$version.tar.gz" daniel-siepmann.de:webs/daniel-siepmann.de/htdocs/public/fileadmin/
|
2022-10-11 15:12:55 +02:00
|
|
|
cd /tmp
|
|
|
|
rm -rf /tmp/phpactor "phpactor-$version.tar.gz"
|
2022-09-16 09:50:20 +02:00
|
|
|
'';
|
|
|
|
}
|