mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
matomo: refactor into single package file
This commit is contained in:
parent
d7ac52bd81
commit
83eb8d8020
3 changed files with 156 additions and 181 deletions
|
@ -5,11 +5,7 @@
|
|||
}:
|
||||
|
||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
matomoTest =
|
||||
package:
|
||||
makeTest {
|
||||
name = "matomo";
|
||||
|
||||
|
@ -17,7 +13,6 @@ let
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.matomo = {
|
||||
package = package;
|
||||
enable = true;
|
||||
nginx = {
|
||||
forceSSL = false;
|
||||
|
@ -57,19 +52,14 @@ let
|
|||
machine.sleep(1)
|
||||
machine.wait_for_unit("phpfpm-matomo.service")
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
matomo = matomoTest pkgs.matomo // {
|
||||
name = "matomo";
|
||||
|
||||
meta.maintainers =
|
||||
with maintainers;
|
||||
with pkgs.lib.maintainers;
|
||||
[
|
||||
florianjacob
|
||||
mmilata
|
||||
twey
|
||||
boozedog
|
||||
]
|
||||
++ lib.teams.flyingcircus.members;
|
||||
};
|
||||
++ pkgs.lib.teams.flyingcircus.members;
|
||||
}
|
||||
|
|
|
@ -7,27 +7,13 @@
|
|||
nixosTests,
|
||||
}:
|
||||
|
||||
let
|
||||
versions = {
|
||||
matomo = {
|
||||
version = "5.2.1";
|
||||
hash = "sha256-5glMwwIG0Uo8bu904u40FUa+yaUlrQe1nUCkv9/ATks=";
|
||||
};
|
||||
};
|
||||
common =
|
||||
pname:
|
||||
{
|
||||
version,
|
||||
hash,
|
||||
beta ? null,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "${pname}-${finalAttrs.version}";
|
||||
version = version + lib.optionalString (beta != null) "-${toString beta}";
|
||||
pname = "matomo";
|
||||
version = "5.2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://builds.matomo.org/matomo-${finalAttrs.version}.tar.gz";
|
||||
inherit hash;
|
||||
hash = "sha256-5glMwwIG0Uo8bu904u40FUa+yaUlrQe1nUCkv9/ATks=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -104,7 +90,9 @@ let
|
|||
'';
|
||||
|
||||
passthru = {
|
||||
tests = nixosTests.matomo."${pname}";
|
||||
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||
inherit (nixosTests) matomo;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -123,6 +111,4 @@ let
|
|||
]
|
||||
++ teams.flyingcircus.members;
|
||||
};
|
||||
});
|
||||
in
|
||||
lib.mapAttrs common versions
|
||||
})
|
||||
|
|
|
@ -11882,8 +11882,7 @@ with pkgs;
|
|||
};
|
||||
|
||||
tt-rss = callPackage ../servers/tt-rss { };
|
||||
inherit (callPackages ../servers/web-apps/matomo {})
|
||||
matomo;
|
||||
matomo = callPackage ../servers/web-apps/matomo { };
|
||||
|
||||
unpackerr = callPackage ../servers/unpackerr {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa WebKit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue