diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2018-12-19 15:06:53 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2018-12-20 13:03:41 +0100 |
commit | 64d05bbdd2a745885f195b4f54fc518b07b9db7c (patch) | |
tree | 436f5ae7ec885bb92bd9173012aea73e7064393c /pkgs/servers/clickhouse | |
parent | e5d6f9e329e32280dc0a57e659b84e9c32a59506 (diff) |
clickhouse: fix module and package runtime
Although the package itself builds fine, the module fails because it
tries to log into a non-existant file in `/var/log` which breaks the
service. Patching to default config to log to stdout by default fixes
the issue. Additionally this is the better solution as NixOS heavily
relies on systemd (and thus journald) for logging.
Also, the runtime relies on `/etc/localtime` to start, as it's not
required by the module system we set UTC as sensitive default when using
the module.
To ensure that the service's basic functionality is available, a simple
NixOS test has been added.
Diffstat (limited to 'pkgs/servers/clickhouse')
-rw-r--r-- | pkgs/servers/clickhouse/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix index b53c6388d18d..bddffc52fd77 100644 --- a/pkgs/servers/clickhouse/default.nix +++ b/pkgs/servers/clickhouse/default.nix @@ -36,6 +36,11 @@ stdenv.mkDerivation rec { postInstall = '' rm -rf $out/share/clickhouse-test + + sed -i -e '\!<log>/var/log/clickhouse-server/clickhouse-server\.log</log>!d' \ + $out/etc/clickhouse-server/config.xml + substituteInPlace $out/etc/clickhouse-server/config.xml \ + --replace "<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>" "<console>1</console>" ''; meta = with stdenv.lib; { |