summary refs log tree commit diff
path: root/pkgs/servers/web-apps/matomo/default.nix
diff options
context:
space:
mode:
authorRobert Djubek <envy1988@gmail.com>2019-09-24 08:08:19 +0000
committerRobert Djubek <envy1988@gmail.com>2019-10-28 05:11:22 +0000
commitcb85d27adc70dcab9138198109402fa69ff68eca (patch)
tree2bb545039229c262d3e2f54069e6f48022941bf0 /pkgs/servers/web-apps/matomo/default.nix
parent6ea626d3e25629420fb1dc6f717cbebf861c9895 (diff)
downloadnixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.tar
nixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.tar.gz
nixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.tar.bz2
nixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.tar.lz
nixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.tar.xz
nixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.tar.zst
nixpkgs-cb85d27adc70dcab9138198109402fa69ff68eca.zip
matomo-beta: init at 3.12.0-b3
Add a beta version of matomo 3.12 that has recent bug fixes. They release these more frequently so it's a good option to have.
Diffstat (limited to 'pkgs/servers/web-apps/matomo/default.nix')
-rw-r--r--pkgs/servers/web-apps/matomo/default.nix29
1 files changed, 24 insertions, 5 deletions
diff --git a/pkgs/servers/web-apps/matomo/default.nix b/pkgs/servers/web-apps/matomo/default.nix
index e848cb83c52..e990a16c038 100644
--- a/pkgs/servers/web-apps/matomo/default.nix
+++ b/pkgs/servers/web-apps/matomo/default.nix
@@ -1,12 +1,30 @@
 { stdenv, fetchurl, makeWrapper, php }:
 
+let
+  versions = {
+    matomo = {
+      version = "3.11.0";
+      sha256 = "1fbnmmzzsi3dfm9qm30wypxjcazl37mryaik9mlrb19hnp2md40q";
+    };
+
+    matomo-beta = {
+      version = "3.12.0";
+      beta = 3;
+      sha256 = "1n7b8cag7rpi6y4145cll2irz3in4668jkiicy06wm5nq6lb4bdf";
+    };
+  };
+  common = pname: {version, sha256, beta ? null}:
+    let fullVersion = version + stdenv.lib.optionalString (beta != null) "-b${toString beta}";
+  name = "${pname}-${fullVersion}";
+in
+
 stdenv.mkDerivation rec {
-  pname = "matomo";
-  version = "3.11.0";
+  inherit name;
+  version = fullVersion;
 
   src = fetchurl {
     url = "https://builds.matomo.org/matomo-${version}.tar.gz";
-    sha256 = "1fbnmmzzsi3dfm9qm30wypxjcazl37mryaik9mlrb19hnp2md40q";
+    inherit sha256;
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -53,6 +71,7 @@ stdenv.mkDerivation rec {
     license = licenses.gpl3Plus;
     homepage = https://matomo.org/;
     platforms = platforms.all;
-    maintainers = [ maintainers.florianjacob ];
+    maintainers = with maintainers; [ florianjacob kiwi ];
   };
-}
+};
+in stdenv.lib.mapAttrs common versions