-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters