diff options
author | Tomas Antonio Lopez <entropy.overseer@entropic.network> | 2021-06-23 12:44:20 +0900 |
---|---|---|
committer | Tomas Antonio Lopez <entropy.overseer@entropic.network> | 2021-06-26 13:31:38 +0900 |
commit | bbea3741fc6ad8c26dc6e3689f7d1732e06d90e3 (patch) | |
tree | 6d9c5eaf718712fcda3f03b6c937f64721dedd4f /pkgs/applications/misc/jquake | |
parent | 14afd6e5f98a105ba9c5ce66186564d908c56ee1 (diff) |
jquake: discard debug messages by default
JQuake outputs too frequent debug-like messages to stdout, filling system logs quickly.
Diffstat (limited to 'pkgs/applications/misc/jquake')
-rw-r--r-- | pkgs/applications/misc/jquake/default.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/applications/misc/jquake/default.nix b/pkgs/applications/misc/jquake/default.nix index eccd8b4c1896a..2a3f1aec4136b 100644 --- a/pkgs/applications/misc/jquake/default.nix +++ b/pkgs/applications/misc/jquake/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchurl, copyDesktopItems, makeDesktopItem, unzip, jre8 }: +{ lib, stdenv, fetchurl, copyDesktopItems, makeDesktopItem, unzip, jre8 +, logOutput ? false +}: stdenv.mkDerivation rec { pname = "jquake"; @@ -14,10 +16,9 @@ stdenv.mkDerivation rec { sourceRoot = "."; postPatch = '' - # JQuake emits a lot of debug-like messages in console, but I - # don't think it's in our interest to void them by default. Log them at - # the appropriate level. - sed -i "/^java/ s/$/\ | logger -p user.debug/" JQuake.sh + # JQuake emits a lot of debug-like messages on stdout. Either drop the output + # stream entirely or log them at 'user.debug' level. + sed -i "/^java/ s/$/ ${if logOutput then "| logger -p user.debug" else "> \\/dev\\/null"}/" JQuake.sh # By default, an 'errors.log' file is created in the current directory. # cd into a temporary directory and let it be created there. |