Merge pull request #128030 from nessdoor/nixpkgs/jquake

This commit is contained in:
Sandro 2021-06-26 19:09:07 +02:00 committed by GitHub
commit b752a224e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.