2015-08-30 16:18:47 +02:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, cmake
|
2014-03-14 23:39:56 +01:00
|
|
|
|
|
|
|
# dependencies
|
2015-03-24 19:59:51 +01:00
|
|
|
, glib
|
2014-03-14 23:39:56 +01:00
|
|
|
|
|
|
|
# optional features without extra dependencies
|
2015-03-24 19:59:51 +01:00
|
|
|
, mpdSupport ? true
|
|
|
|
, ibmSupport ? true # IBM/Lenovo notebooks
|
|
|
|
|
2014-03-14 23:39:56 +01:00
|
|
|
# optional features with extra dependencies
|
2015-08-30 16:18:47 +02:00
|
|
|
, ncursesSupport ? true , ncurses ? null
|
2015-03-24 19:59:51 +01:00
|
|
|
, x11Support ? true , x11 ? null
|
|
|
|
, xdamageSupport ? x11Support, libXdamage ? null
|
|
|
|
, imlib2Support ? x11Support, imlib2 ? null
|
|
|
|
|
2015-08-30 16:18:47 +02:00
|
|
|
, luaSupport ? true , lua ? null
|
2015-03-24 19:59:51 +01:00
|
|
|
, luaImlib2Support ? luaSupport && imlib2Support
|
|
|
|
, luaCairoSupport ? luaSupport && x11Support, cairo ? null
|
|
|
|
, toluapp ? null
|
|
|
|
|
|
|
|
, wirelessSupport ? true , wirelesstools ? null
|
|
|
|
|
|
|
|
, curlSupport ? true , curl ? null
|
|
|
|
, rssSupport ? curlSupport
|
|
|
|
, weatherMetarSupport ? curlSupport
|
|
|
|
, weatherXoapSupport ? curlSupport
|
|
|
|
, libxml2 ? null
|
2014-03-14 23:39:56 +01:00
|
|
|
}:
|
|
|
|
|
2015-08-30 16:18:47 +02:00
|
|
|
assert ncursesSupport -> ncurses != null;
|
2015-03-24 19:59:51 +01:00
|
|
|
|
|
|
|
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 23:39:56 +01:00
|
|
|
|
2015-03-24 19:59:51 +01:00
|
|
|
assert wirelessSupport -> wirelesstools != null;
|
|
|
|
|
|
|
|
assert curlSupport -> curl != null;
|
|
|
|
assert rssSupport -> curlSupport && libxml2 != null;
|
|
|
|
assert weatherMetarSupport -> curlSupport;
|
|
|
|
assert weatherXoapSupport -> curlSupport && libxml2 != null;
|
2014-03-14 23:39:56 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2010-05-27 21:33:58 +02:00
|
|
|
|
2012-01-10 00:44:44 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-08-30 16:18:47 +02:00
|
|
|
name = "conky-${version}";
|
|
|
|
version = "1.10.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "brndnmtthws";
|
|
|
|
repo = "conky";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "00vyrf72l54j3majqmn6vykqvvb15vygsaby644nsb5vpma6b1cn";
|
2010-05-27 21:33:58 +02:00
|
|
|
};
|
|
|
|
|
2014-07-14 09:33:06 +02:00
|
|
|
NIX_LDFLAGS = "-lgcc_s";
|
|
|
|
|
2015-08-30 16:18:47 +02:00
|
|
|
buildInputs = [ pkgconfig glib cmake ]
|
|
|
|
++ optional ncursesSupport ncurses
|
2015-03-24 19:59:51 +01:00
|
|
|
++ optional x11Support x11
|
|
|
|
++ optional xdamageSupport libXdamage
|
|
|
|
++ optional imlib2Support imlib2
|
|
|
|
++ optional luaSupport lua
|
|
|
|
++ optionals luaImlib2Support [ toluapp imlib2 ]
|
|
|
|
++ optionals luaCairoSupport [ toluapp cairo ]
|
|
|
|
++ optional wirelessSupport wirelesstools
|
|
|
|
++ optional curlSupport curl
|
|
|
|
++ optional rssSupport libxml2
|
|
|
|
++ optional weatherXoapSupport libxml2
|
2014-03-14 23:39:56 +01:00
|
|
|
;
|
2012-09-10 23:34:44 +02:00
|
|
|
|
2015-08-30 16:18:47 +02:00
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
|
|
|
|
++ optional curlSupport "-DBUILD_CURL=ON"
|
|
|
|
++ optional (!ibmSupport) "-DBUILD_IBM=OFF"
|
|
|
|
++ optional imlib2Support "-DBUILD_IMLIB2=ON"
|
|
|
|
++ optional luaCairoSupport "-DBUILD_LUA_CAIRO=ON"
|
|
|
|
++ optional luaImlib2Support "-DBUILD_LUA_IMLIB2=ON"
|
|
|
|
++ optional (!mpdSupport) "-DBUILD_MPD=OFF"
|
|
|
|
++ optional (!ncursesSupport) "-DBUILD_NCURSES=OFF"
|
|
|
|
++ optional rssSupport "-DBUILD_RSS=ON"
|
|
|
|
++ optional (!x11Support) "-DBUILD_X11=OFF"
|
|
|
|
++ optional xdamageSupport "-DBUILD_XDAMAGE=ON"
|
|
|
|
++ optional weatherMetarSupport "-DBUILD_WEATHER_METAR=ON"
|
|
|
|
++ optional weatherXoapSupport "-DBUILD_WEATHER_XOAP=ON"
|
|
|
|
++ optional wirelessSupport "-DBUILD_WLAN=ON"
|
|
|
|
;
|
2012-01-10 00:44:44 +01:00
|
|
|
|
2015-08-30 16:18:47 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-27 21:33:58 +02:00
|
|
|
homepage = http://conky.sourceforge.net/;
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Advanced, highly configurable system monitor based on torsmo";
|
2015-08-30 16:18:47 +02:00
|
|
|
maintainers = [ maintainers.guibert ];
|
|
|
|
license = licenses.gpl3Plus;
|
2010-05-27 21:33:58 +02:00
|
|
|
};
|
|
|
|
}
|