lcdproc: init at 0.5.9

This commit is contained in:
Peter Hoeg 2017-07-26 16:31:52 +08:00
parent 175c3526ae
commit b23b1345f7
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{ stdenv, fetchFromGitHub, autoreconfHook, makeWrapper, pkgconfig
, doxygen, freetype, libX11, libftdi, libftdi1, libusb, libusb1, ncurses, perl }:
stdenv.mkDerivation rec {
name = "lcdproc-${version}";
version = "0.5.9";
src = fetchFromGitHub {
owner = "lcdproc";
repo = "lcdproc";
rev = "v${version}";
sha256 = "1r885zv1gsh88j43x6fvzbdgfkh712a227d369h4fdcbnnfd0kpm";
};
patches = [
./hardcode_mtab.patch
];
configureFlags = [
"--enable-lcdproc-menus"
"--enable-drivers=all"
"--with-pidfile-dir=/run"
];
buildInputs = [ freetype libX11 libftdi libusb libusb1 ncurses ];
nativeBuildInputs = [ autoreconfHook doxygen makeWrapper pkgconfig ];
enableParallelBuilding = true;
postFixup = ''
for f in $out/bin/*.pl ; do
substituteInPlace $f \
--replace /usr/bin/perl ${stdenv.lib.getBin perl}/bin/perl
done
# NixOS will not use this file anyway but at least we can now execute LCDd
substituteInPlace $out/etc/LCDd.conf \
--replace server/drivers/ $out/lib/lcdproc/
'';
meta = with stdenv.lib; {
description = "Client/server suite for controlling a wide variety of LCD devices";
homepage = http://lcdproc.org/;
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,17 @@
diff --git a/clients/lcdproc/machine_Linux.c b/clients/lcdproc/machine_Linux.c
index 7bb7266..a629674 100644
--- a/clients/lcdproc/machine_Linux.c
+++ b/clients/lcdproc/machine_Linux.c
@@ -259,11 +259,7 @@ machine_get_fs(mounts_type fs[], int *cnt)
char line[256];
int x = 0, err;
-#ifdef MTAB_FILE
- mtab_fd = fopen(MTAB_FILE, "r");
-#else
-#error "Can't find your mounted filesystem table file."
-#endif
+ mtab_fd = fopen("/etc/mtab", "r");
/* Get rid of old, unmounted filesystems... */
memset(fs, 0, sizeof(mounts_type) * 256);

View File

@ -1069,6 +1069,8 @@ with pkgs;
kapacitor = callPackage ../servers/monitoring/kapacitor { };
lcdproc = callPackage ../servers/monitoring/lcdproc { };
languagetool = callPackage ../tools/text/languagetool { };
loccount = callPackage ../development/tools/misc/loccount { };