summary refs log tree commit diff
path: root/pkgs/servers/web-apps
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/web-apps')
-rw-r--r--pkgs/servers/web-apps/matomo/default.nix23
1 files changed, 22 insertions, 1 deletions
diff --git a/pkgs/servers/web-apps/matomo/default.nix b/pkgs/servers/web-apps/matomo/default.nix
index e990a16c038..98c532d5ddc 100644
--- a/pkgs/servers/web-apps/matomo/default.nix
+++ b/pkgs/servers/web-apps/matomo/default.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     runHook preInstall
 
-    # copy evertything to share/, used as webroot folder, and then remove what's known to be not needed
+    # copy everything to share/, used as webroot folder, and then remove what's known to be not needed
     mkdir -p $out/share
     cp -ra * $out/share/
     # tmp/ is created by matomo in PIWIK_USER_PATH
@@ -66,6 +66,27 @@ stdenv.mkDerivation rec {
     runHook postInstall
   '';
 
+  filesToFix = [
+    "misc/composer/build-xhprof.sh"
+    "misc/composer/clean-xhprof.sh"
+    "misc/cron/archive.sh"
+    "plugins/Installation/FormDatabaseSetup.php"
+    "vendor/leafo/lessphp/package.sh"
+    "vendor/pear/archive_tar/sync-php4"
+    "vendor/szymach/c-pchart/coverage.sh"
+  ];
+
+  # This fixes the consistency check in the admin interface
+  postFixup = ''
+    pushd $out/share > /dev/null
+    for f in $filesToFix; do
+      length="$(wc -c "$f" | cut -d' ' -f1)"
+      hash="$(md5sum "$f" | cut -d' ' -f1)"
+      sed -i "s:\\(\"$f\"[^(]*(\\).*:\\1\"$length\", \"$hash\"),:g" config/manifest.inc.php
+    done
+    popd > /dev/null
+  '';
+
   meta = with stdenv.lib; {
     description = "A real-time web analytics application";
     license = licenses.gpl3Plus;