diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/batti/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/misc/batti/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/batti/default.nix b/nixpkgs/pkgs/applications/misc/batti/default.nix new file mode 100644 index 000000000000..9322aefb2d69 --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/batti/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl +, pkgconfig, gettext, pythonPackages +, gtk2, gdk_pixbuf, upower +, makeWrapper }: + +let + inherit (pythonPackages) dbus-python pygtk python; +in stdenv.mkDerivation rec { + + 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; + [ pkgconfig gettext python gtk2 pygtk dbus-python gdk_pixbuf upower makeWrapper ]; + + dontConfigure = true; + + buildPhase = '' + python setup.py build + ''; + + installPhase = '' + python setup.py install --prefix $out + 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" + ''; + + + 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; + broken = true; # see https://github.com/NixOS/nixpkgs/pull/4031#issuecomment-56283520 + }; +} + +# TODO: fix the "icon not found" problems... |