From 7eb5b00d820f7c429cacfeaa0866c8034bb2185e Mon Sep 17 00:00:00 2001 From: koral Date: Sun, 30 Aug 2015 14:18:47 +0000 Subject: [PATCH] conky: 1.9.0 -> 1.10.0 --- pkgs/os-specific/linux/conky/default.nix | 80 +++++++++--------------- 1 file changed, 31 insertions(+), 49 deletions(-) diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix index c54d4aa6319..60bfe093017 100644 --- a/pkgs/os-specific/linux/conky/default.nix +++ b/pkgs/os-specific/linux/conky/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig +{ stdenv, fetchFromGitHub, pkgconfig, cmake # dependencies , glib @@ -7,23 +7,17 @@ , 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 - # optional features with extra dependencies +, ncursesSupport ? true , ncurses ? null , x11Support ? true , x11 ? null , xdamageSupport ? x11Support, libXdamage ? null , imlib2Support ? x11Support, imlib2 ? null -, luaSupport ? true , lua ? 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 @@ -33,7 +27,7 @@ , libxml2 ? null }: -#assert ncursesSupport -> ncurses != null; +assert ncursesSupport -> ncurses != null; assert x11Support -> x11 != null; assert xdamageSupport -> x11Support && libXdamage != null; @@ -46,8 +40,6 @@ assert luaCairoSupport -> luaSupport && toluapp != null assert luaCairoSupport || luaImlib2Support -> lua.luaversion == "5.1"; -assert alsaSupport -> alsaLib != null; - assert wirelessSupport -> wirelesstools != null; assert curlSupport -> curl != null; @@ -58,62 +50,52 @@ assert weatherXoapSupport -> curlSupport && libxml2 != null; with stdenv.lib; stdenv.mkDerivation rec { - name = "conky-1.9.0"; + name = "conky-${version}"; + version = "1.10.0"; - src = fetchurl { - url = "mirror://sourceforge/conky/${name}.tar.bz2"; - sha256 = "0vxvjmi3cdvnp994sv5zcdyncfn0mlxa71p2wm9zpyrmy58bbwds"; + src = fetchFromGitHub { + owner = "brndnmtthws"; + repo = "conky"; + rev = "v${version}"; + sha256 = "00vyrf72l54j3majqmn6vykqvvb15vygsaby644nsb5vpma6b1cn"; }; NIX_LDFLAGS = "-lgcc_s"; - buildInputs = [ pkgconfig glib ] - ++ [ ncurses ] - #++ optional ncursesSupport ncurses + buildInputs = [ pkgconfig glib cmake ] + ++ 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 - ++ optional wirelessSupport wirelesstools - ++ optional curlSupport curl ++ optional rssSupport libxml2 ++ optional weatherXoapSupport libxml2 ; - configureFlags = - let flag = state: flags: if state then map (x: "--enable-${x}") flags - else map (x: "--disable-${x}") flags; - in flag mpdSupport [ "mpd" ] - ++ flag ibmSupport [ "ibm" ] + 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" + ; - #++ 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" ] - - ++ flag wirelessSupport [ "wlan" ] - - ++ flag curlSupport [ "curl" ] - ++ flag rssSupport [ "rss" ] - ++ flag weatherMetarSupport [ "weather-metar" ] - ++ flag weatherXoapSupport [ "weather-xoap" ] - ; - - meta = { + meta = with stdenv.lib; { homepage = http://conky.sourceforge.net/; description = "Advanced, highly configurable system monitor based on torsmo"; - maintainers = [ stdenv.lib.maintainers.guibert ]; - license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ maintainers.guibert ]; + license = licenses.gpl3Plus; }; }