Merge pull request #296921 from patka-123/engelsystem-cleanup

engelsystem: cleanup
This commit is contained in:
Martin Weinelt 2024-03-18 17:14:59 +01:00 committed by GitHub
commit 03fcd060ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 12 deletions

View file

@ -3,8 +3,6 @@
let
inherit (lib) mkDefault mkEnableOption mkIf mkOption types mkPackageOption;
cfg = config.services.engelsystem;
phpExt = pkgs.php.withExtensions
({ enabled, all }: with all; [ filter mysqlnd mysqli pdo pdo_mysql mbstring ] ++ enabled);
in {
options = {
services.engelsystem = {
@ -101,7 +99,6 @@ in {
'';
services.phpfpm.pools.engelsystem = {
phpPackage = phpExt;
user = "engelsystem";
settings = {
"listen.owner" = config.services.nginx.user;

View file

@ -1,9 +1,11 @@
{ lib, stdenv, fetchzip, php, writeText, nixosTests }:
{ lib
, fetchzip
, nixosTests
, php
, stdenv
, writeText
}:
let
phpExt = php.withExtensions
({ enabled, all }: with all; [ filter mysqlnd mysqli pdo pdo_mysql mbstring ] ++ enabled);
in
stdenv.mkDerivation rec {
pname = "engelsystem";
version = "3.5.0";
@ -13,7 +15,7 @@ stdenv.mkDerivation rec {
hash = "sha256-RbzAHBZN02u14WaLtq5EOh4XwIdHKvzX7NhDBhn/CaU=";
};
buildInputs = [ phpExt ];
buildInputs = [ php ];
installPhase = ''
runHook preInstall
@ -30,7 +32,7 @@ stdenv.mkDerivation rec {
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"
sed -i -e "1 s|.*|#\!${lib.getExe php}|" "$out/share/engelsystem/bin/migrate"
ln -s "$out/share/engelsystem/bin/migrate" "$out/bin/migrate"
runHook postInstall
@ -39,13 +41,13 @@ stdenv.mkDerivation rec {
passthru.tests = nixosTests.engelsystem;
meta = with lib; {
changelog = "https://github.com/engelsystem/engelsystem/releases/tag/v${version}";
description =
"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";
homepage = "https://engelsystem.de";
changelog = "https://github.com/engelsystem/engelsystem/releases/tag/v${version}";
license = licenses.gpl2;
maintainers = with maintainers; [ kloenk ];
mainProgram = "migrate";
maintainers = with maintainers; [ ];
platforms = platforms.all;
};
}