summary refs log tree commit diff
path: root/pkgs/os-specific/linux/conky/default.nix
diff options
context:
space:
mode:
authorkoral <koral@mailoo.org>2015-08-30 14:18:47 +0000
committerkoral <koral@mailoo.org>2015-08-30 14:18:47 +0000
commit7eb5b00d820f7c429cacfeaa0866c8034bb2185e (patch)
treef875e897002004a72d89689154f9405e11e5b43a /pkgs/os-specific/linux/conky/default.nix
parentf423ba3863092692f32a939f701d0eaf97afe9b2 (diff)
downloadnixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.tar
nixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.tar.gz
nixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.tar.bz2
nixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.tar.lz
nixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.tar.xz
nixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.tar.zst
nixpkgs-7eb5b00d820f7c429cacfeaa0866c8034bb2185e.zip
conky: 1.9.0 -> 1.10.0
Diffstat (limited to 'pkgs/os-specific/linux/conky/default.nix')
-rw-r--r--pkgs/os-specific/linux/conky/default.nix82
1 files changed, 32 insertions, 50 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";
-
-  src = fetchurl {
-    url = "mirror://sourceforge/conky/${name}.tar.bz2";
-    sha256 = "0vxvjmi3cdvnp994sv5zcdyncfn0mlxa71p2wm9zpyrmy58bbwds";
+  name = "conky-${version}";
+  version = "1.10.0";
+
+  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" ]
-
-     #++ 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" ]
-     ;
+  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"
+    ;
 
-  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;
   };
 }