2014-03-14 22:39:56 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
|
|
|
|
|
|
|
# dependencies
|
2015-03-24 18:59:51 +00:00
|
|
|
, glib
|
2014-03-14 22:39:56 +00:00
|
|
|
|
|
|
|
# optional features without extra dependencies
|
2015-03-24 18:59:51 +00:00
|
|
|
, mpdSupport ? true
|
|
|
|
, ibmSupport ? true # IBM/Lenovo notebooks
|
|
|
|
|
|
|
|
# This should be optional, but it is not due to a bug in conky
|
|
|
|
# Please, try to make it optional again on update
|
|
|
|
, ncurses
|
|
|
|
#, ncursesSupport ? true , ncurses ? null
|
2014-03-14 22:39:56 +00:00
|
|
|
|
|
|
|
# optional features with extra dependencies
|
2015-03-24 18:59:51 +00:00
|
|
|
, x11Support ? true , x11 ? null
|
|
|
|
, xdamageSupport ? x11Support, libXdamage ? null
|
|
|
|
, imlib2Support ? x11Support, imlib2 ? null
|
|
|
|
, luaSupport ? true , lua ? null
|
|
|
|
|
|
|
|
, luaImlib2Support ? luaSupport && imlib2Support
|
|
|
|
, luaCairoSupport ? luaSupport && x11Support, cairo ? null
|
|
|
|
, toluapp ? null
|
|
|
|
|
|
|
|
, alsaSupport ? true , alsaLib ? null
|
|
|
|
|
|
|
|
, wirelessSupport ? true , wirelesstools ? null
|
|
|
|
|
|
|
|
, curlSupport ? true , curl ? null
|
|
|
|
, rssSupport ? curlSupport
|
|
|
|
, weatherMetarSupport ? curlSupport
|
|
|
|
, weatherXoapSupport ? curlSupport
|
|
|
|
, libxml2 ? null
|
2014-03-14 22:39:56 +00:00
|
|
|
}:
|
|
|
|
|
2015-03-24 18:59:51 +00:00
|
|
|
#assert ncursesSupport -> ncurses != null;
|
|
|
|
|
|
|
|
assert x11Support -> x11 != null;
|
|
|
|
assert xdamageSupport -> x11Support && libXdamage != null;
|
|
|
|
assert imlib2Support -> x11Support && imlib2 != null;
|
|
|
|
assert luaSupport -> lua != null;
|
|
|
|
assert luaImlib2Support -> luaSupport && imlib2Support
|
|
|
|
&& toluapp != null;
|
|
|
|
assert luaCairoSupport -> luaSupport && toluapp != null
|
|
|
|
&& cairo != null;
|
|
|
|
assert luaCairoSupport || luaImlib2Support
|
|
|
|
-> lua.luaversion == "5.1";
|
2014-03-14 22:39:56 +00:00
|
|
|
|
2015-03-24 18:59:51 +00:00
|
|
|
assert alsaSupport -> alsaLib != null;
|
|
|
|
|
|
|
|
assert wirelessSupport -> wirelesstools != null;
|
|
|
|
|
|
|
|
assert curlSupport -> curl != null;
|
|
|
|
assert rssSupport -> curlSupport && libxml2 != null;
|
|
|
|
assert weatherMetarSupport -> curlSupport;
|
|
|
|
assert weatherXoapSupport -> curlSupport && libxml2 != null;
|
2014-03-14 22:39:56 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2010-05-27 20:33:58 +01:00
|
|
|
|
2012-01-09 23:44:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-09-10 21:06:02 +01:00
|
|
|
name = "conky-1.9.0";
|
2010-05-27 20:33:58 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-01-09 23:44:44 +00:00
|
|
|
url = "mirror://sourceforge/conky/${name}.tar.bz2";
|
2012-09-10 21:06:02 +01:00
|
|
|
sha256 = "0vxvjmi3cdvnp994sv5zcdyncfn0mlxa71p2wm9zpyrmy58bbwds";
|
2010-05-27 20:33:58 +01:00
|
|
|
};
|
|
|
|
|
2014-07-14 08:33:06 +01:00
|
|
|
NIX_LDFLAGS = "-lgcc_s";
|
|
|
|
|
2015-03-24 18:59:51 +00:00
|
|
|
buildInputs = [ pkgconfig glib ]
|
|
|
|
++ [ ncurses ]
|
|
|
|
#++ optional ncursesSupport ncurses
|
|
|
|
++ optional x11Support x11
|
|
|
|
++ optional xdamageSupport libXdamage
|
|
|
|
++ optional imlib2Support imlib2
|
|
|
|
++ optional luaSupport lua
|
|
|
|
++ optionals luaImlib2Support [ toluapp imlib2 ]
|
|
|
|
++ optionals luaCairoSupport [ toluapp cairo ]
|
|
|
|
|
|
|
|
++ optional alsaSupport alsaLib
|
2014-03-14 22:39:56 +00:00
|
|
|
|
2015-03-24 18:59:51 +00:00
|
|
|
++ optional wirelessSupport wirelesstools
|
|
|
|
|
|
|
|
++ optional curlSupport curl
|
|
|
|
++ optional rssSupport libxml2
|
|
|
|
++ optional weatherXoapSupport libxml2
|
2014-03-14 22:39:56 +00:00
|
|
|
;
|
2012-09-10 22:34:44 +01:00
|
|
|
|
2012-01-09 23:44:44 +00:00
|
|
|
configureFlags =
|
2014-03-14 22:39:56 +00:00
|
|
|
let flag = state: flags: if state then map (x: "--enable-${x}") flags
|
|
|
|
else map (x: "--disable-${x}") flags;
|
2015-03-24 18:59:51 +00:00
|
|
|
in flag mpdSupport [ "mpd" ]
|
|
|
|
++ flag ibmSupport [ "ibm" ]
|
|
|
|
|
|
|
|
#++ flag ncursesSupport [ "ncurses" ]
|
|
|
|
++ flag x11Support [ "x11" "xft" "argb" "double-buffer" "own-window" ] # conky won't compile without --enable-own-window
|
|
|
|
++ flag xdamageSupport [ "xdamage" ]
|
|
|
|
++ flag imlib2Support [ "imlib2" ]
|
|
|
|
++ flag luaSupport [ "lua" ]
|
|
|
|
++ flag luaImlib2Support [ "lua-imlib2" ]
|
|
|
|
++ flag luaCairoSupport [ "lua-cairo" ]
|
|
|
|
|
|
|
|
++ flag alsaSupport [ "alsa" ]
|
2014-03-14 22:39:56 +00:00
|
|
|
|
2015-03-24 18:59:51 +00:00
|
|
|
++ flag wirelessSupport [ "wlan" ]
|
2014-03-14 22:39:56 +00:00
|
|
|
|
2015-03-24 18:59:51 +00:00
|
|
|
++ flag curlSupport [ "curl" ]
|
|
|
|
++ flag rssSupport [ "rss" ]
|
|
|
|
++ flag weatherMetarSupport [ "weather-metar" ]
|
|
|
|
++ flag weatherXoapSupport [ "weather-xoap" ]
|
2014-03-14 22:39:56 +00:00
|
|
|
;
|
2012-01-09 23:44:44 +00:00
|
|
|
|
2010-05-27 20:33:58 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://conky.sourceforge.net/;
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Advanced, highly configurable system monitor based on torsmo";
|
2010-05-27 20:33:58 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.guibert ];
|
2012-09-10 22:40:52 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2010-05-27 20:33:58 +01:00
|
|
|
};
|
|
|
|
}
|