nixpkgs/pkgs/os-specific/linux/conky/default.nix
Bjørn Forsman c9baba9212 Fix many package descriptions
(My OCD kicked in today...)

Remove repeated package names, capitalize first word, remove trailing
periods and move overlong descriptions to longDescription.

I also simplified some descriptions as well, when they were particularly
long or technical, often based on Arch Linux' package descriptions.

I've tried to stay away from generated expressions (and I think I
succeeded).

Some specifics worth mentioning:
 * cron, has "Vixie Cron" in its description. The "Vixie" part is not
   mentioned anywhere else. I kept it in a parenthesis at the end of the
   description.

 * ctags description started with "Exuberant Ctags ...", and the
   "exuberant" part is not mentioned elsewhere. Kept it in a parenthesis
   at the end of description.

 * nix has the description "The Nix Deployment System". Since that
   doesn't really say much what it is/does (especially after removing
   the package name!), I changed that to "Powerful package manager that
   makes package management reliable and reproducible" (borrowed from
   nixos.org).

 * Tons of "GNU Foo, Foo is a [the important bits]" descriptions
   is changed to just [the important bits]. If the package name doesn't
   contain GNU I don't think it's needed to say it in the description
   either.
2014-08-24 22:31:37 +02:00

75 lines
2.2 KiB
Nix

{ 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;
stdenv.mkDerivation rec {
name = "conky-1.9.0";
src = fetchurl {
url = "mirror://sourceforge/conky/${name}.tar.bz2";
sha256 = "0vxvjmi3cdvnp994sv5zcdyncfn0mlxa71p2wm9zpyrmy58bbwds";
};
NIX_LDFLAGS = "-lgcc_s";
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 ]
;
configureFlags =
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" ]
;
meta = {
homepage = http://conky.sourceforge.net/;
description = "Advanced, highly configurable system monitor based on torsmo";
maintainers = [ stdenv.lib.maintainers.guibert ];
license = stdenv.lib.licenses.gpl3Plus;
};
}