From 93aba53a08418eba4ce60dfd907326fdf9c28c87 Mon Sep 17 00:00:00 2001 From: Patka Date: Mon, 18 Mar 2024 16:01:57 +0100 Subject: [PATCH] engelsystem: cleanup The custom php with extensions is not needed. The default already has all the needed extensions enabled by default. --- .../modules/services/web-apps/engelsystem.nix | 3 --- pkgs/servers/web-apps/engelsystem/default.nix | 20 ++++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/web-apps/engelsystem.nix b/nixos/modules/services/web-apps/engelsystem.nix index 7fb912415643..ae7b2b9e7d0c 100644 --- a/nixos/modules/services/web-apps/engelsystem.nix +++ b/nixos/modules/services/web-apps/engelsystem.nix @@ -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; diff --git a/pkgs/servers/web-apps/engelsystem/default.nix b/pkgs/servers/web-apps/engelsystem/default.nix index 8274f3e88418..4f6563db90b7 100644 --- a/pkgs/servers/web-apps/engelsystem/default.nix +++ b/pkgs/servers/web-apps/engelsystem/default.nix @@ -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; }; }