Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / web-apps / engelsystem / default.nix
blob264c3243d2165d285b680a395117e874a375a2e6
1 { lib
2 , fetchzip
3 , nixosTests
4 , php
5 , stdenv
6 , writeText
7 }:
9 stdenv.mkDerivation rec {
10   pname = "engelsystem";
11   version = "3.5.0";
13   src = fetchzip {
14     url = "https://github.com/engelsystem/engelsystem/releases/download/v${version}/engelsystem-v${version}.zip";
15     hash = "sha256-RbzAHBZN02u14WaLtq5EOh4XwIdHKvzX7NhDBhn/CaU=";
16   };
18   buildInputs = [ php ];
20   installPhase = ''
21     runHook preInstall
23     # prepare
24     rm -r ./storage/
26     ln -sf /etc/engelsystem/config.php ./config/config.php
27     ln -sf /var/lib/engelsystem/storage/ ./storage
29     mkdir -p $out/share/engelsystem
30     mkdir -p $out/bin
31     cp -r . $out/share/engelsystem
33     echo $(command -v php)
34     # The patchShebangAuto function always used the php without extensions, so path the shebang manually
35     sed -i -e "1 s|.*|#\!${lib.getExe php}|" "$out/share/engelsystem/bin/migrate"
36     ln -s "$out/share/engelsystem/bin/migrate" "$out/bin/migrate"
38     runHook postInstall
39   '';
41   passthru.tests = nixosTests.engelsystem;
43   meta = with lib; {
44     changelog = "https://github.com/engelsystem/engelsystem/releases/tag/v${version}";
45     description =
46       "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";
47     homepage = "https://engelsystem.de";
48     license = licenses.gpl2Only;
49     mainProgram = "migrate";
50     maintainers = with maintainers; [ ];
51     platforms = platforms.all;
52   };