mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
matomo: make the substituteInPlace a proper patch,
improve description
This commit is contained in:
parent
a892bd8ebf
commit
d431aed997
2 changed files with 22 additions and 4 deletions
|
@ -13,13 +13,18 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# regarding the 127.0.0.1 substitute:
|
||||
# This replaces the default value of the database server field.
|
||||
# make-localhost-default-database-server.patch:
|
||||
# This changes the default value of the database server field
|
||||
# from 127.0.0.1 to localhost.
|
||||
# unix socket authentication only works with localhost,
|
||||
# but password-based SQL authentication works with both.
|
||||
# TODO: is upstream interested in this?
|
||||
patches = [ ./make-localhost-default-database-host.patch ];
|
||||
|
||||
# this bootstrap.php adds support for getting PIWIK_USER_PATH
|
||||
# from an environment variable. Point it to a mutable location
|
||||
# to be able to use matomo read-only from the nix store
|
||||
postPatch = ''
|
||||
substituteInPlace plugins/Installation/FormDatabaseSetup.php \
|
||||
--replace "=> '127.0.0.1'," "=> 'localhost',"
|
||||
cp ${./bootstrap.php} bootstrap.php
|
||||
'';
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
|
||||
index 9364f49870..2625cbb91b 100644
|
||||
--- a/plugins/Installation/FormDatabaseSetup.php
|
||||
+++ b/plugins/Installation/FormDatabaseSetup.php
|
||||
@@ -82,7 +82,7 @@ class FormDatabaseSetup extends QuickForm2
|
||||
|
||||
// default values
|
||||
$this->addDataSource(new HTML_QuickForm2_DataSource_Array(array(
|
||||
- 'host' => '127.0.0.1',
|
||||
+ 'host' => 'localhost',
|
||||
'type' => $defaultDatabaseType,
|
||||
'tables_prefix' => 'matomo_',
|
||||
)));
|
Loading…
Reference in a new issue