New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/zoneminder: fix evaluation with new php refactor #84952
Conversation
Thank you for fixing zoneminder and for supplying the test! The issue here is that the |
@talyz Thanks this fixed the issue for me! |
ea6b518
to
cdb8c32
Compare
cdb8c32
to
9e339cd
Compare
ping |
@@ -289,11 +285,9 @@ in { | |||
phpfpm = lib.mkIf useNginx { | |||
pools.zoneminder = { | |||
inherit user group; | |||
phpPackage = pkgs.php.withExtensions (e: pkgs.php.enabledExtensions ++ [ e.apcu ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure that this will fail on current master, we did another change in #85026 😉
phpPackage = pkgs.php.withExtensions (e: pkgs.php.enabledExtensions ++ [ e.apcu ]); | |
phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [ all.apcu ]); |
This should work with the updated withExtensions
, so a rebase on master and this fix and it should be all fine 🙂
9e339cd
to
2d65971
Compare
Just rebased against master and briefly tested that it's working. |
@danielfullmer Now it doesn't work, the tests doesn't build. But it's because of the reason I've mentioned above :-)
|
2d65971
to
fed0777
Compare
@etu Whoops! I didn't fixup that commit correctly. Just pushed the change. |
@danielfullmer Now the tests works, that's nice :) Do you mind applying this diff as well to the commit adding the test? diff --git a/pkgs/servers/zoneminder/default.nix b/pkgs/servers/zoneminder/default.nix
index 978893d28ff..8dcbe36850a 100644
--- a/pkgs/servers/zoneminder/default.nix
+++ b/pkgs/servers/zoneminder/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, substituteAll, cmake, makeWrapper, pkgconfig
, curl, ffmpeg, glib, libjpeg, libselinux, libsepol, mp4v2, libmysqlclient, mysql, pcre, perl, perlPackages
, polkit, utillinuxMinimal, x264, zlib
-, coreutils, procps, psmisc }:
+, coreutils, procps, psmisc, nixosTests }:
# NOTES:
#
@@ -172,7 +172,10 @@ in stdenv.mkDerivation rec {
"-DZM_WEB_GROUP=${user}"
];
- passthru = { inherit dirName; };
+ passthru = {
+ inherit dirName;
+ tests = nixosTests.zoneminder;
+ };
postInstall = ''
PERL5LIB="$PERL5LIB''${PERL5LIB:+:}$out/${perl.libPrefix}" That way one can build the attribute |
fed0777
to
4f35b7e
Compare
@etu Done. |
@danielfullmer Thanks! :) |
Motivation for this change
Zoneminder is currently broken in master, I believe as a result of recently merging #83896. In this PR I've fixed the evaluation and also added a test to hopefully catch regressions in the future.
This PR should be ready to merge after #84993.
Original issue (now fixed thanks to @talyz below):
However, the phpfm service still does not yet work.
The included test fails with:
It appears to fail here:
https://github.com/ZoneMinder/zoneminder/blob/689956bba738de157ebf31f2e9e22f02bc574686/web/includes/database.php#L59
However, as far as I can tell, the DB connection parameters are set correctly.
I'm not very familiar with PHP to properly debug this. I was hoping I could get some feedback from @etu or @talyz if they have any ideas if this is a result of their PR.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)