···13131414 nativeBuildInputs = [ makeWrapper ];
15151616- # regarding the 127.0.0.1 substitute:
1717- # This replaces the default value of the database server field.
1616+ # make-localhost-default-database-server.patch:
1717+ # This changes the default value of the database server field
1818+ # from 127.0.0.1 to localhost.
1819 # unix socket authentication only works with localhost,
1920 # but password-based SQL authentication works with both.
2121+ # TODO: is upstream interested in this?
2222+ patches = [ ./make-localhost-default-database-host.patch ];
2323+2424+ # this bootstrap.php adds support for getting PIWIK_USER_PATH
2525+ # from an environment variable. Point it to a mutable location
2626+ # to be able to use matomo read-only from the nix store
2027 postPatch = ''
2121- substituteInPlace plugins/Installation/FormDatabaseSetup.php \
2222- --replace "=> '127.0.0.1'," "=> 'localhost',"
2328 cp ${./bootstrap.php} bootstrap.php
2429 '';
2530