From 1d406295a3cff86d16bb27d3ae2b36021802ef1b Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 9 Apr 2021 16:27:57 +0800 Subject: [PATCH] lcdproc: do not show the GPL on every start (#118772) * lcdproc: do not show the GPL on every start --- pkgs/servers/monitoring/lcdproc/default.nix | 36 ++++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/pkgs/servers/monitoring/lcdproc/default.nix b/pkgs/servers/monitoring/lcdproc/default.nix index 551fa028811f..bd0a7dc0dfbe 100644 --- a/pkgs/servers/monitoring/lcdproc/default.nix +++ b/pkgs/servers/monitoring/lcdproc/default.nix @@ -1,14 +1,27 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, makeWrapper, pkg-config -, doxygen, freetype, libX11, libftdi, libusb-compat-0_1, libusb1, ncurses, perl }: +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, makeWrapper +, pkg-config +, doxygen +, freetype +, libX11 +, libftdi +, libusb-compat-0_1 +, libusb1 +, ncurses +, perl +}: stdenv.mkDerivation rec { pname = "lcdproc"; version = "0.5.9"; src = fetchFromGitHub { - owner = "lcdproc"; - repo = "lcdproc"; - rev = "v${version}"; + owner = "lcdproc"; + repo = "lcdproc"; + rev = "v${version}"; sha256 = "1r885zv1gsh88j43x6fvzbdgfkh712a227d369h4fdcbnnfd0kpm"; }; @@ -16,6 +29,12 @@ stdenv.mkDerivation rec { ./hardcode_mtab.patch ]; + # we don't need to see the GPL every time we launch lcdd in the foreground + postPatch = '' + substituteInPlace server/main.c \ + --replace 'output_GPL_notice();' '// output_GPL_notice();' + ''; + configureFlags = [ "--enable-lcdproc-menus" "--enable-drivers=all" @@ -23,6 +42,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ freetype libX11 libftdi libusb-compat-0_1 libusb1 ncurses ]; + nativeBuildInputs = [ autoreconfHook doxygen makeWrapper pkg-config ]; # In 0.5.9: gcc: error: libbignum.a: No such file or directory @@ -41,9 +61,9 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Client/server suite for controlling a wide variety of LCD devices"; - homepage = "http://lcdproc.org/"; - license = licenses.gpl2; + homepage = "http://lcdproc.org/"; + license = licenses.gpl2; maintainers = with maintainers; [ peterhoeg ]; - platforms = platforms.unix; + platforms = platforms.unix; }; }