Merge pull request #199729 from peat-psuwit/zoneminder-1.36.31

zoneminder, nixos/zoneminder: 1.36.28 -> 1.36.31, fix issues relating to upgrade
This commit is contained in:
Sandro 2023-03-14 17:02:05 +01:00 committed by GitHub
commit 66e0910e86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -283,7 +283,8 @@ in {
phpfpm = lib.mkIf useNginx {
pools.zoneminder = {
inherit user group;
phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [ all.apcu ]);
phpPackage = pkgs.php.withExtensions (
{ enabled, all }: enabled ++ [ all.apcu all.sysvsem ]);
phpOptions = ''
date.timezone = "${config.time.timeZone}"
'';
@ -326,6 +327,15 @@ in {
fi
${zoneminder}/bin/zmupdate.pl -nointeractive
${zoneminder}/bin/zmupdate.pl --nointeractive -f
# Update ZM's Nix store path in the configuration table. Do nothing if the config doesn't
# contain ZM's Nix store path.
${config.services.mysql.package}/bin/mysql -u zoneminder zm << EOF
UPDATE Config
SET Value = REGEXP_REPLACE(Value, "^/nix/store/[^-/]+-zoneminder-[^/]+", "${pkgs.zoneminder}")
WHERE Name = "ZM_FONT_FILE_LOCATION";
EOF
'';
serviceConfig = {
User = user;

View File

@ -57,13 +57,13 @@ let
in stdenv.mkDerivation rec {
pname = "zoneminder";
version = "1.36.28";
version = "1.36.32";
src = fetchFromGitHub {
owner = "ZoneMinder";
repo = "zoneminder";
rev = version;
sha256 = "sha256-x00u7AWMNS+wAO/tdWi7GYbMZZM7XnszCO57ZDlm0J0=";
sha256 = "sha256-8iRoGpkpZVOOr0wSY9iey2x4gPfKTfUNtt5TCHCCRIQ=";
fetchSubmodules = true;
};