2014-09-10 19:48:39 +02:00
|
|
|
{ stdenv, fetchurl
|
2016-08-16 22:51:21 +02:00
|
|
|
, pkgconfig, gettext, pythonPackages
|
2016-09-11 23:24:51 +02:00
|
|
|
, gtk2, gdk_pixbuf, upower
|
2014-10-03 19:54:08 +02:00
|
|
|
, makeWrapper }:
|
2014-09-10 19:48:39 +02:00
|
|
|
|
2016-08-16 22:51:21 +02:00
|
|
|
let
|
2016-09-13 12:19:06 +02:00
|
|
|
inherit (pythonPackages) dbus-python pygtk python;
|
2016-08-16 22:51:21 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2014-09-10 19:48:39 +02:00
|
|
|
|
|
|
|
name = "batti-${version}";
|
|
|
|
version = "0.3.8";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://batti-gtk.googlecode.com/files/${name}.tar.gz";
|
|
|
|
sha256 = "072d92gpsiiin631589nj77i2w1425p6db0qxyml7myscfy9jgx6";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = with stdenv.lib;
|
2016-09-13 12:19:06 +02:00
|
|
|
[ pkgconfig gettext python gtk2 pygtk dbus-python gdk_pixbuf upower makeWrapper ];
|
2014-09-10 19:48:39 +02:00
|
|
|
|
|
|
|
configurePhase = "true";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
python setup.py build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
python setup.py install --prefix $out
|
2014-10-03 19:54:08 +02:00
|
|
|
wrapProgram "$out/bin/batti" \
|
|
|
|
--set PYTHONPATH "$PYTHONPATH:$(toPythonPath $out)" \
|
|
|
|
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
|
2014-09-10 19:48:39 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An {UPower,GTK}-based battery monitor for the system tray";
|
|
|
|
longDescription = ''
|
|
|
|
Batti is a simple battery monitor for the system tray. Batti
|
|
|
|
uses UPower, and if that is missing DeviceKit.Power, for it's
|
|
|
|
power information.
|
|
|
|
'';
|
|
|
|
homepage = http://batti-gtk.googlecode.com/;
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
|
|
|
platforms = platforms.linux;
|
2015-03-16 09:44:22 +01:00
|
|
|
broken = true; # see https://github.com/NixOS/nixpkgs/pull/4031#issuecomment-56283520
|
2014-09-10 19:48:39 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
# TODO: fix the "icon not found" problems...
|