2014-03-14 22:39:56 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, glib, ncurses
|
|
|
|
|
|
|
|
# optional features without extra dependencies
|
|
|
|
, mpdSupport ? true
|
|
|
|
|
|
|
|
# optional features with extra dependencies
|
|
|
|
, x11Support ? false, x11 ? null
|
|
|
|
, xdamage ? false, libXdamage ? null
|
|
|
|
, wireless ? false, wirelesstools ? null
|
|
|
|
, luaSupport ? false, lua5 ? null
|
|
|
|
|
|
|
|
, rss ? false
|
|
|
|
, weatherMetar ? false
|
|
|
|
, weatherXoap ? false
|
|
|
|
, curl ? null, libxml2 ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert luaSupport -> lua5 != null;
|
|
|
|
assert wireless -> wirelesstools != null;
|
|
|
|
assert x11Support -> x11 != null;
|
|
|
|
assert xdamage -> x11Support && libXdamage != null;
|
|
|
|
|
|
|
|
assert rss -> curl != null && libxml2 != null;
|
|
|
|
assert weatherMetar -> curl != null;
|
|
|
|
assert weatherXoap -> curl != null && libxml2 != null;
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
2014-03-14 22:39:56 +00:00
|
|
|
buildInputs = [ pkgconfig glib ncurses ]
|
|
|
|
++ optional luaSupport lua5
|
|
|
|
++ optional wireless wirelesstools
|
|
|
|
++ optional x11Support x11
|
|
|
|
++ optional xdamage libXdamage
|
|
|
|
|
|
|
|
++ optionals rss [ curl libxml2 ]
|
|
|
|
++ optional weatherMetar curl
|
|
|
|
++ optionals weatherXoap [ curl libxml2 ]
|
|
|
|
;
|
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;
|
|
|
|
in flag mpdSupport [ "mpd" ]
|
|
|
|
|
|
|
|
++ flag luaSupport [ "lua" ]
|
|
|
|
++ flag wireless [ "wlan" ]
|
|
|
|
++ flag x11Support [ "x11" "xft" "argb" "double-buffer" "own-window" ] # conky won't compile without --enable-own-window
|
|
|
|
++ flag xdamage [ "xdamage" ]
|
|
|
|
|
|
|
|
++ flag rss [ "rss" ]
|
|
|
|
++ flag weatherMetar [ "weather-metar" ]
|
|
|
|
++ flag weatherXoap [ "weather-xoap" ]
|
|
|
|
;
|
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
|
|
|
};
|
|
|
|
}
|