@@ -1,12 +1,30 @@
11{ stdenv, fetchurl, makeWrapper, php }:
22
3+let
4+ versions = {
5+ matomo = {
6+ version = "3.11.0";
7+ sha256 = "1fbnmmzzsi3dfm9qm30wypxjcazl37mryaik9mlrb19hnp2md40q";
8+ };
9+
10+ matomo-beta = {
11+ version = "3.12.0";
12+ beta = 3;
13+ sha256 = "1n7b8cag7rpi6y4145cll2irz3in4668jkiicy06wm5nq6lb4bdf";
14+ };
15+ };
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
20+
321stdenv.mkDerivation rec {
4− pname = "matomo";
5− version = "3.11.0";
22+ inherit name;
23+ version = fullVersion;
624
725 src = fetchurl {
826 url = "https://builds.matomo.org/matomo-${version}.tar.gz";
9− sha256 = "1fbnmmzzsi3dfm9qm30wypxjcazl37mryaik9mlrb19hnp2md40q";
27+ inherit sha256;
1028 };
1129
1230 nativeBuildInputs = [ makeWrapper ];
@@ -53,6 +71,7 @@ stdenv.mkDerivation rec {
5371 license = licenses.gpl3Plus;
5472 homepage = https://matomo.org/;
5573 platforms = platforms.all;
56− maintainers = [ maintainers.florianjacob ];
74+ maintainers = with maintainers; [ florianjacob kiwi ];
5775 };
58−}
76+};
77+in stdenv.lib.mapAttrs common versions