nixpkgs/pkgs/servers/web-apps/engelsystem/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchzip, php, writeText, nixosTests }:
2020-03-16 22:01:23 +00:00
let
phpExt = php.withExtensions
2022-05-25 16:54:21 +00:00
({ enabled, all }: with all; [ filter mysqlnd mysqli pdo pdo_mysql ]);
2023-03-12 15:55:17 +00:00
in
stdenv.mkDerivation rec {
2020-03-16 22:01:23 +00:00
pname = "engelsystem";
2023-03-12 15:55:17 +00:00
version = "3.3.0";
2020-03-16 22:01:23 +00:00
src = fetchzip {
2023-08-09 23:05:54 +00:00
url = "https://github.com/engelsystem/engelsystem/releases/download/v${version}/engelsystem-v${version}.zip";
2023-03-12 15:55:17 +00:00
hash = "sha256-DS0klm26udXsiiFToeOJooA1WUR8gk0qf/UJL8E77ps=";
2020-03-16 22:01:23 +00:00
};
buildInputs = [ phpExt ];
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
sed -i -e "1 s|.*|#\!${phpExt}/bin/php|" "$out/share/engelsystem/bin/migrate"
ln -s "$out/share/engelsystem/bin/migrate" "$out/bin/migrate"
runHook postInstall
'';
2020-05-24 12:20:58 +00:00
passthru.tests = nixosTests.engelsystem;
meta = with lib; {
2020-03-16 22:01:23 +00:00
description =
2020-10-27 20:11:22 +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-03-16 22:01:23 +00:00
homepage = "https://engelsystem.de";
2023-03-12 15:55:17 +00:00
changelog = "https://github.com/engelsystem/engelsystem/releases/tag/v${version}";
license = licenses.gpl2;
2020-03-16 22:01:23 +00:00
maintainers = with maintainers; [ kloenk ];
mainProgram = "migrate";
2020-03-16 22:01:23 +00:00
platforms = platforms.all;
};
}