{ lib, stdenv, fetchurl }: let generic = { version, sha256, eol ? false, extraVulnerabilities ? [] }: let major = lib.versions.major version; in stdenv.mkDerivation rec { pname = "selfServicePassword"; inherit version; src = fetchurl { url = "https://github.com/ltb-project/self-service-password/archive/refs/tags/v${version}.tar.gz"; inherit sha256; }; installPhase = '' runHook preInstall mkdir -p $out/ cp -R . $out/ runHook postInstall ''; meta = with lib; { description = "PHP application that allows users to change their password in an LDAP directory."; homepage = "https://github.com/ltb-project/self-service-password"; license = licenses.agpl3Plus; platforms = with platforms; unix; }; }; in { selfServicePassword = generic { version = "1.5.2"; sha256 = "dcef404e6b715f16bda71381647af38052a67deef4d387312856596ef131e030"; }; systemd.services = { # When upgrading the Nextcloud package, Nextcloud can report errors such as # "The files of the app [all apps in /var/lib/nextcloud/apps] were not replaced correctly" # Restarting phpfpm on Nextcloud package update fixes these issues (but this is a workaround). phpfpm-selfservicepassword.restartTriggers = [ selfServicePassword ]; selfservicepassword-setup = let c = cfg.config; writePhpArrary = a: "[${concatMapStringsSep "," (val: ''"${toString val}"'') a}]"; overrideConfig = pkgs.writeText "config.inc.local.php" ''