@@ -3,103 +3,107 @@
33let
44 versions = {
55 matomo = {
6− version = "3.13.1";
7− sha256 = "071m3sw3rrhlccbwdyklcn8rwp4mcnii5m2a7zmgx3rv87i9n2ni";
6+ version = "3.13.2";
7+ sha256 = "1psysdz60h5rvgbsflkfprygxnh3kq60snqamyss07rk0ahbcb16";
88 };
99
1010 matomo-beta = {
11− version = "3.12.0";
12− beta = 3;
13− sha256 = "1n7b8cag7rpi6y4145cll2irz3in4668jkiicy06wm5nq6lb4bdf";
11+ version = "3.13.2";
12+ # `beta` examples: "b1", "rc1", null
13+ # TOOD when updating: use null if stable version is >= latest beta or release candidate
14+ beta = null;
15+ sha256 = "1psysdz60h5rvgbsflkfprygxnh3kq60snqamyss07rk0ahbcb16";
1416 };
1517 };
16− common = pname: {version, sha256, beta ? null}:
17− let fullVersion = version + stdenv.lib.optionalString (beta != null) "-b${toString beta}";
18− name = "${pname}-${fullVersion}";
19−in
18+ common = pname: { version, sha256, beta ? null }:
19+ let
20+ fullVersion = version + stdenv.lib.optionalString (beta != null) "-${toString beta}";
21+ name = "${pname}-${fullVersion}";
22+ in
2023
21−stdenv.mkDerivation rec {
22− inherit name;
23− version = fullVersion;
24+ stdenv.mkDerivation rec {
25+ inherit name;
26+ version = fullVersion;
2427
25− src = fetchurl {
26− url = "https://builds.matomo.org/matomo-${version}.tar.gz";
27− inherit sha256;
28− };
28+ src = fetchurl {
29+ url = "https://builds.matomo.org/matomo-${version}.tar.gz";
30+ inherit sha256;
31+ };
2932
30− nativeBuildInputs = [ makeWrapper ];
33+ nativeBuildInputs = [ makeWrapper ];
3134
32− # make-localhost-default-database-server.patch:
33− # This changes the default value of the database server field
34− # from 127.0.0.1 to localhost.
35− # unix socket authentication only works with localhost,
36− # but password-based SQL authentication works with both.
37− # TODO: is upstream interested in this?
38− # -> discussion at https://github.com/matomo-org/matomo/issues/12646
39− patches = [ ./make-localhost-default-database-host.patch ];
35+ # make-localhost-default-database-server.patch:
36+ # This changes the default value of the database server field
37+ # from 127.0.0.1 to localhost.
38+ # unix socket authentication only works with localhost,
39+ # but password-based SQL authentication works with both.
40+ # TODO: is upstream interested in this?
41+ # -> discussion at https://github.com/matomo-org/matomo/issues/12646
42+ patches = [ ./make-localhost-default-database-host.patch ];
4043
41− # this bootstrap.php adds support for getting PIWIK_USER_PATH
42− # from an environment variable. Point it to a mutable location
43− # to be able to use matomo read-only from the nix store
44− postPatch = ''
45− cp ${./bootstrap.php} bootstrap.php
46− '';
44+ # this bootstrap.php adds support for getting PIWIK_USER_PATH
45+ # from an environment variable. Point it to a mutable location
46+ # to be able to use matomo read-only from the nix store
47+ postPatch = ''
48+ cp ${./bootstrap.php} bootstrap.php
49+ '';
4750
48− # TODO: future versions might rename the PIWIK_… variables to MATOMO_…
49− # TODO: Move more unnecessary files from share/, especially using PIWIK_INCLUDE_PATH.
50− # See https://forum.matomo.org/t/bootstrap-php/5926/10 and
51− # https://github.com/matomo-org/matomo/issues/11654#issuecomment-297730843
52− installPhase = ''
53− runHook preInstall
51+ # TODO: future versions might rename the PIWIK_… variables to MATOMO_…
52+ # TODO: Move more unnecessary files from share/, especially using PIWIK_INCLUDE_PATH.
53+ # See https://forum.matomo.org/t/bootstrap-php/5926/10 and
54+ # https://github.com/matomo-org/matomo/issues/11654#issuecomment-297730843
55+ installPhase = ''
56+ runHook preInstall
5457
55− # copy everything to share/, used as webroot folder, and then remove what's known to be not needed
56− mkdir -p $out/share
57− cp -ra * $out/share/
58− # tmp/ is created by matomo in PIWIK_USER_PATH
59− rmdir $out/share/tmp
60− # config/ needs to be accessed by PIWIK_USER_PATH anyway
61− ln -s $out/share/config $out/
58+ # copy everything to share/, used as webroot folder, and then remove what's known to be not needed
59+ mkdir -p $out/share
60+ cp -ra * $out/share/
61+ # tmp/ is created by matomo in PIWIK_USER_PATH
62+ rmdir $out/share/tmp
63+ # config/ needs to be accessed by PIWIK_USER_PATH anyway
64+ ln -s $out/share/config $out/
6265
63− makeWrapper ${php}/bin/php $out/bin/matomo-console \
64− --add-flags "$out/share/console"
66+ makeWrapper ${php}/bin/php $out/bin/matomo-console \
67+ --add-flags "$out/share/console"
6568
66− runHook postInstall
67− '';
69+ runHook postInstall
70+ '';
6871
69− filesToFix = [
70− "misc/composer/build-xhprof.sh"
71− "misc/composer/clean-xhprof.sh"
72− "misc/cron/archive.sh"
73− "plugins/Installation/FormDatabaseSetup.php"
74− "vendor/leafo/lessphp/package.sh"
75− "vendor/pear/archive_tar/sync-php4"
76− "vendor/szymach/c-pchart/coverage.sh"
77− # drupal_test.sh does not exist in 3.12.0-b3; added for 3.13.0
78− "vendor/twig/twig/drupal_test.sh"
79− ];
72+ filesToFix = [
73+ "misc/composer/build-xhprof.sh"
74+ "misc/composer/clean-xhprof.sh"
75+ "misc/cron/archive.sh"
76+ "plugins/Installation/FormDatabaseSetup.php"
77+ "vendor/leafo/lessphp/package.sh"
78+ "vendor/pear/archive_tar/sync-php4"
79+ "vendor/szymach/c-pchart/coverage.sh"
80+ # drupal_test.sh does not exist in 3.12.0-b3; added for 3.13.0
81+ "vendor/twig/twig/drupal_test.sh"
82+ ];
8083
81− # This fixes the consistency check in the admin interface
82− #
83− # The filesToFix list may contain files that are exclusive to only one of the versions we build
84− # make sure to test for existence to avoid erroring on an incompatible version and failing
85− postFixup = ''
86− pushd $out/share > /dev/null
87− for f in $filesToFix; do
88− if [ -f "$f" ]; then
89− length="$(wc -c "$f" | cut -d' ' -f1)"
90− hash="$(md5sum "$f" | cut -d' ' -f1)"
91− sed -i "s:\\(\"$f\"[^(]*(\\).*:\\1\"$length\", \"$hash\"),:g" config/manifest.inc.php
92− fi
93− done
94− popd > /dev/null
95− '';
84+ # This fixes the consistency check in the admin interface
85+ #
86+ # The filesToFix list may contain files that are exclusive to only one of the versions we build
87+ # make sure to test for existence to avoid erroring on an incompatible version and failing
88+ postFixup = ''
89+ pushd $out/share > /dev/null
90+ for f in $filesToFix; do
91+ if [ -f "$f" ]; then
92+ length="$(wc -c "$f" | cut -d' ' -f1)"
93+ hash="$(md5sum "$f" | cut -d' ' -f1)"
94+ sed -i "s:\\(\"$f\"[^(]*(\\).*:\\1\"$length\", \"$hash\"),:g" config/manifest.inc.php
95+ fi
96+ done
97+ popd > /dev/null
98+ '';
9699
97− meta = with stdenv.lib; {
98− description = "A real-time web analytics application";
99− license = licenses.gpl3Plus;
100− homepage = https://matomo.org/;
101− platforms = platforms.all;
102− maintainers = with maintainers; [ florianjacob kiwi ];
103− };
104−};
105−in stdenv.lib.mapAttrs common versions
100+ meta = with stdenv.lib; {
101+ description = "A real-time web analytics application";
102+ license = licenses.gpl3Plus;
103+ homepage = https://matomo.org/;
104+ platforms = platforms.all;
105+ maintainers = with maintainers; [ florianjacob kiwi ];
106+ };
107+ };
108+in
109+stdenv.lib.mapAttrs common versions