Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f65db057f503
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f6d41b4b1d1f
Choose a head ref
  • 9 commits
  • 13 files changed
  • 7 contributors

Commits on Oct 28, 2019

  1. nixos/matomo: fix deprecation warnings

    Fixes the phpfpm deprecation warnings about listen and extraConfig by
    using fpm.socket and settings. Removes phpfpmProcessManagerConfig.
    Kiwi committed Oct 28, 2019
    Copy the full SHA
    6ea626d View commit details
  2. 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.
    Kiwi committed Oct 28, 2019
    Copy the full SHA
    cb85d27 View commit details

Commits on Oct 29, 2019

  1. nixos/matomo: add test

    mmilata authored and Kiwi committed Oct 29, 2019
    Copy the full SHA
    605379b View commit details

Commits on Oct 30, 2019

  1. Merge pull request #69342 from Kiwi/matomo-updates

    Matomo (module, package) updates
    aanderse authored Oct 30, 2019
    Copy the full SHA
    722b99b View commit details
  2. vimPlugins: update

    tuxinaut authored and Jon committed Oct 30, 2019
    Copy the full SHA
    c034339 View commit details
  3. fluent-bit: 1.0.6 -> 1.3.2

    marsam authored and Jon committed Oct 30, 2019
    Copy the full SHA
    3221b5f View commit details
  4. spotify-tui: 0.6.2 -> 0.8.0

    marsam authored and Jon committed Oct 30, 2019
    Copy the full SHA
    a56def8 View commit details
  5. gpxsee: 7.15 -> 7.16

    sikmir authored and Jon committed Oct 30, 2019
    Copy the full SHA
    236bbbe View commit details
  6. pythonPackages.worldengine: disable python2 tests

    Jonathan Ringer committed Oct 30, 2019
    Copy the full SHA
    f6d41b4 View commit details
3 changes: 2 additions & 1 deletion nixos/modules/rename.nix
Original file line number Diff line number Diff line change
@@ -135,7 +135,8 @@ with lib;
# piwik was renamed to matomo
(mkRenamedOptionModule [ "services" "piwik" "enable" ] [ "services" "matomo" "enable" ])
(mkRenamedOptionModule [ "services" "piwik" "webServerUser" ] [ "services" "matomo" "webServerUser" ])
(mkRenamedOptionModule [ "services" "piwik" "phpfpmProcessManagerConfig" ] [ "services" "matomo" "phpfpmProcessManagerConfig" ])
(mkRemovedOptionModule [ "services" "piwik" "phpfpmProcessManagerConfig" ] "Use services.phpfpm.pools.<name>.settings")
(mkRemovedOptionModule [ "services" "matomo" "phpfpmProcessManagerConfig" ] "Use services.phpfpm.pools.<name>.settings")
(mkRenamedOptionModule [ "services" "piwik" "nginx" ] [ "services" "matomo" "nginx" ])

# tarsnap
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/matomo-doc.xml
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
<para>
You can use other web servers by forwarding calls for
<filename>index.php</filename> and <filename>piwik.php</filename> to the
<literal>/run/phpfpm-matomo.sock</literal> fastcgi unix socket. You can use
<literal><link linkend="opt-services.phpfpm.pools._name_.socket">services.phpfpm.pools.&lt;name&gt;.socket</link></literal> fastcgi unix socket. You can use
the nginx configuration in the module code as a reference to what else
should be configured.
</para>
56 changes: 22 additions & 34 deletions nixos/modules/services/web-apps/matomo.nix
Original file line number Diff line number Diff line change
@@ -2,15 +2,13 @@
with lib;
let
cfg = config.services.matomo;
fpm = config.services.phpfpm.pools.${pool};

user = "matomo";
dataDir = "/var/lib/${user}";
deprecatedDataDir = "/var/lib/piwik";

pool = user;
# it's not possible to use /run/phpfpm/${pool}.sock because /run/phpfpm/ is root:root 0770,
# and therefore is not accessible by the web server.
phpSocket = "/run/phpfpm-${pool}.sock";
phpExecutionUnit = "phpfpm-${pool}";
databaseService = "mysql.service";

@@ -50,7 +48,7 @@ in {
default = null;
example = "lighttpd";
description = ''
Name of the web server user that forwards requests to the ${phpSocket} fastcgi socket for Matomo if the nginx
Name of the web server user that forwards requests to <option>services.phpfpm.pools.&lt;name&gt;.socket</option> the fastcgi socket for Matomo if the nginx
option is not used. Either this option or the nginx option is mandatory.
If you want to use another webserver than nginx, you need to set this to that server's user
and pass fastcgi requests to `index.php`, `matomo.php` and `piwik.php` (legacy name) to this socket.
@@ -71,25 +69,6 @@ in {
'';
};

phpfpmProcessManagerConfig = mkOption {
type = types.str;
default = ''
; default phpfpm process manager settings
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
; log worker's stdout, but this has a performance hit
catch_workers_output = yes
'';
description = ''
Settings for phpfpm's process manager. You might need to change this depending on the load for Matomo.
'';
};

nginx = mkOption {
type = types.nullOr (types.submodule (
recursiveUpdate
@@ -233,15 +212,24 @@ in {
else if (cfg.webServerUser != null) then cfg.webServerUser else "";
in {
${pool} = {
listen = phpSocket;
extraConfig = ''
listen.owner = ${socketOwner}
listen.group = root
listen.mode = 0600
user = ${user}
env[PIWIK_USER_PATH] = ${dataDir}
${cfg.phpfpmProcessManagerConfig}
inherit user;
phpOptions = ''
error_log = 'stderr'
log_errors = on
'';
settings = mapAttrs (name: mkDefault) {
"listen.owner" = socketOwner;
"listen.group" = "root";
"listen.mode" = "0660";
"pm" = "dynamic";
"pm.max_children" = 75;
"pm.start_servers" = 10;
"pm.min_spare_servers" = 5;
"pm.max_spare_servers" = 20;
"pm.max_requests" = 500;
"catch_workers_output" = true;
};
phpEnv.PIWIK_USER_PATH = dataDir;
};
};

@@ -264,15 +252,15 @@ in {
};
# allow index.php for webinterface
locations."= /index.php".extraConfig = ''
fastcgi_pass unix:${phpSocket};
fastcgi_pass unix:${fpm.socket};
'';
# allow matomo.php for tracking
locations."= /matomo.php".extraConfig = ''
fastcgi_pass unix:${phpSocket};
fastcgi_pass unix:${fpm.socket};
'';
# allow piwik.php for tracking (deprecated name)
locations."= /piwik.php".extraConfig = ''
fastcgi_pass unix:${phpSocket};
fastcgi_pass unix:${fpm.socket};
'';
# Any other attempt to access any php files is forbidden
locations."~* ^.+\\.php$".extraConfig = ''
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -159,6 +159,7 @@ in
#logstash = handleTest ./logstash.nix {};
mailcatcher = handleTest ./mailcatcher.nix {};
mathics = handleTest ./mathics.nix {};
matomo = handleTest ./matomo.nix {};
matrix-synapse = handleTest ./matrix-synapse.nix {};
mediawiki = handleTest ./mediawiki.nix {};
memcached = handleTest ./memcached.nix {};
43 changes: 43 additions & 0 deletions nixos/tests/matomo.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{ system ? builtins.currentSystem, config ? { }
, pkgs ? import ../.. { inherit system config; } }:

with import ../lib/testing.nix { inherit system pkgs; };
with pkgs.lib;

let
matomoTest = package:
makeTest {
machine = { config, pkgs, ... }: {
services.matomo = {
package = package;
enable = true;
nginx = {
forceSSL = false;
enableACME = false;
};
};
services.mysql = {
enable = true;
package = pkgs.mysql;
};
services.nginx.enable = true;
};

testScript = ''
startAll;
$machine->waitForUnit("mysql.service");
$machine->waitForUnit("phpfpm-matomo.service");
$machine->waitForUnit("nginx.service");
$machine->succeed("curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'");
'';
};
in {
matomo = matomoTest pkgs.matomo // {
name = "matomo";
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ];
};
matomo-beta = matomoTest pkgs.matomo-beta // {
name = "matomo-beta";
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ];
};
}
8 changes: 5 additions & 3 deletions pkgs/applications/audio/spotify-tui/default.nix
Original file line number Diff line number Diff line change
@@ -2,16 +2,18 @@

rustPlatform.buildRustPackage rec {
pname = "spotify-tui";
version = "0.6.2";
version = "0.8.0";

src = fetchFromGitHub {
owner = "Rigellute";
repo = "spotify-tui";
rev = "v${version}";
sha256 = "0ksrdavnvjpph7h0lcc2hvxhygfbn0dmsabq2ilslvpa80ph2c53";
sha256 = "0pgmcld48sd34jpsc4lr8dbqs8iwk0xp9aa3b15m61mv3lf04qc6";
};

cargoSha256 = "029g80mcqvmckszpbzm4hxs5w63n41ah4rc1b93i9c1nzvncd811";
cargoSha256 = "1rb4dl9zn3xx2yrapx5cfsli93ggmdq8w9fqi8cy8giyja1mnqfl";

cargoPatches = [ ./fix-cargo-lock-version.patch ];

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl ]
13 changes: 13 additions & 0 deletions pkgs/applications/audio/spotify-tui/fix-cargo-lock-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git i/Cargo.lock w/Cargo.lock
index e1eae72..e004898 100644
--- i/Cargo.lock
+++ w/Cargo.lock
@@ -1310,7 +1310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "spotify-tui"
-version = "0.7.5"
+version = "0.8.0"
dependencies = [
"backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
4 changes: 2 additions & 2 deletions pkgs/applications/misc/gpxsee/default.nix
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@

mkDerivation rec {
pname = "gpxsee";
version = "7.15";
version = "7.16";

src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
sha256 = "036g17479nqy3kvy3dy3cn7yi7r57rsp28gkcay0qhf9h0az76p3";
sha256 = "1mkfhb2c9qafjpva600nyn6yik49l4q1k6id1xvrci37wsn6ijav";
};

nativeBuildInputs = [ qmake ];
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/worldengine/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv
, buildPythonPackage
, pythonOlder
, isPy27
, fetchFromGitHub
, nose
, noise
@@ -48,6 +49,7 @@ buildPythonPackage rec {

# with python<3.5, unittest fails to discover tests because of their filenames
# so nose is used instead.
doCheck = !isPy27; # google namespace clash
checkInputs = stdenv.lib.optional (pythonOlder "3.5") [ nose ];
postCheck = stdenv.lib.optionalString (pythonOlder "3.5") ''
nosetests tests
Loading