2024-04-21 15:54:59 +00:00
|
|
|
{ lib
|
|
|
|
, fetchzip
|
|
|
|
, nixosTests
|
|
|
|
, php
|
|
|
|
, stdenv
|
|
|
|
, writeText
|
|
|
|
}:
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-05-29 06:06:01 +00:00
|
|
|
pname = "engelsystem";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.5.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2023-08-10 07:59:29 +00:00
|
|
|
url = "https://github.com/engelsystem/engelsystem/releases/download/v${version}/engelsystem-v${version}.zip";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-RbzAHBZN02u14WaLtq5EOh4XwIdHKvzX7NhDBhn/CaU=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = [ php ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
# prepare
|
|
|
|
rm -r ./storage/
|
|
|
|
|
|
|
|
ln -sf /etc/engelsystem/config.php ./config/config.php
|
|
|
|
ln -sf /var/lib/engelsystem/storage/ ./storage
|
|
|
|
|
|
|
|
mkdir -p $out/share/engelsystem
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r . $out/share/engelsystem
|
|
|
|
|
|
|
|
echo $(command -v php)
|
|
|
|
# The patchShebangAuto function always used the php without extensions, so path the shebang manually
|
2024-04-21 15:54:59 +00:00
|
|
|
sed -i -e "1 s|.*|#\!${lib.getExe php}|" "$out/share/engelsystem/bin/migrate"
|
2020-05-29 06:06:01 +00:00
|
|
|
ln -s "$out/share/engelsystem/bin/migrate" "$out/bin/migrate"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests = nixosTests.engelsystem;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/engelsystem/engelsystem/releases/tag/v${version}";
|
2020-05-29 06:06:01 +00:00
|
|
|
description =
|
2020-11-03 02:18:15 +00:00
|
|
|
"Coordinate your volunteers in teams, assign them to work shifts or let them decide for themselves when and where they want to help with what";
|
2020-05-29 06:06:01 +00:00
|
|
|
homepage = "https://engelsystem.de";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
mainProgram = "migrate";
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-05-29 06:06:01 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|