Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0e2a4780df77
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4437c3d36639
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on May 17, 2020

  1. Copy the full SHA
    e958afa View commit details
  2. Copy the full SHA
    4f35b7e View commit details
  3. Merge pull request #84952 from danielfullmer/zoneminder-php-fix

    nixos/zoneminder: fix evaluation with new php refactor
    etu authored May 17, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4437c3d View commit details
Showing with 31 additions and 10 deletions.
  1. +1 −7 nixos/modules/services/misc/zoneminder.nix
  2. +2 −1 nixos/tests/all-tests.nix
  3. +23 −0 nixos/tests/zoneminder.nix
  4. +5 −2 pkgs/servers/zoneminder/default.nix
8 changes: 1 addition & 7 deletions nixos/modules/services/misc/zoneminder.nix
Original file line number Diff line number Diff line change
@@ -63,10 +63,6 @@ let
${cfg.extraConfig}
'';

phpExtensions = with pkgs.phpPackages; [
{ pkg = apcu; name = "apcu"; }
];

in {
options = {
services.zoneminder = with lib; {
@@ -289,11 +285,9 @@ in {
phpfpm = lib.mkIf useNginx {
pools.zoneminder = {
inherit user group;
phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [ all.apcu ]);
phpOptions = ''
date.timezone = "${config.time.timeZone}"
${lib.concatStringsSep "\n" (map (e:
"extension=${e.pkg}/lib/php/extensions/${e.name}.so") phpExtensions)}
'';
settings = lib.mapAttrs (name: lib.mkDefault) {
"listen.owner" = user;
3 changes: 2 additions & 1 deletion nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -348,6 +348,7 @@ in
yabar = handleTest ./yabar.nix {};
yggdrasil = handleTest ./yggdrasil.nix {};
zfs = handleTest ./zfs.nix {};
zsh-history = handleTest ./zsh-history.nix {};
zoneminder = handleTest ./zoneminder.nix {};
zookeeper = handleTest ./zookeeper.nix {};
zsh-history = handleTest ./zsh-history.nix {};
}
23 changes: 23 additions & 0 deletions nixos/tests/zoneminder.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import ./make-test-python.nix ({ lib, ...}:

{
name = "zoneminder";
meta.maintainers = with lib.maintainers; [ danielfullmer ];

machine = { ... }:
{
services.zoneminder = {
enable = true;
database.createLocally = true;
database.username = "zoneminder";
};
time.timeZone = "America/New_York";
};

testScript = ''
machine.wait_for_unit("zoneminder.service")
machine.wait_for_unit("nginx.service")
machine.wait_for_open_port(8095)
machine.succeed("curl --fail http://localhost:8095/")
'';
})
7 changes: 5 additions & 2 deletions pkgs/servers/zoneminder/default.nix
Original file line number Diff line number Diff line change
@@ -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}"