2018-02-25 03:23:58 +01:00
|
|
|
{ stdenv, lib, fetchurl, pkgconfig, intltool, glib, gtk, dbus-glib, upower, xfconf
|
2018-03-12 23:55:30 +01:00
|
|
|
, libxfce4ui, libxfce4util, libnotify, xfce4-panel, hicolor-icon-theme
|
2016-06-09 14:44:20 +02:00
|
|
|
, withGtk3 ? false, gtk3, libxfce4ui_gtk3, xfce4panel_gtk3 }:
|
2015-10-14 13:23:37 +02:00
|
|
|
let
|
2013-02-21 12:16:51 +01:00
|
|
|
p_name = "xfce4-power-manager";
|
2016-06-09 14:44:20 +02:00
|
|
|
ver_maj = if withGtk3 then "1.6" else "1.4";
|
|
|
|
ver_min = if withGtk3 then "0" else "4";
|
2015-10-14 13:23:37 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${p_name}-${ver_maj}.${ver_min}";
|
2013-02-21 12:16:51 +01:00
|
|
|
|
2011-08-23 00:51:23 +02:00
|
|
|
src = fetchurl {
|
2013-02-21 12:16:51 +01:00
|
|
|
url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
|
2016-06-09 14:44:20 +02:00
|
|
|
sha256 =
|
|
|
|
if withGtk3
|
|
|
|
then "0avzhllpimcn7a6z9aa4jn0zg5ahxr9ks5ldchizycdb0rz1bqxx"
|
|
|
|
else "01rvqy1cif4s8lkidb7hhmsz7d9f2fwcwvc51xycaj3qgsmch3n5";
|
2011-08-23 00:51:23 +02:00
|
|
|
};
|
2013-09-08 00:03:44 +02:00
|
|
|
|
2011-08-23 00:51:23 +02:00
|
|
|
buildInputs =
|
2018-02-25 03:23:58 +01:00
|
|
|
[ pkgconfig intltool glib dbus-glib upower xfconf libxfce4util
|
|
|
|
libnotify hicolor-icon-theme
|
2016-06-09 14:44:20 +02:00
|
|
|
] ++
|
|
|
|
(if withGtk3
|
|
|
|
then [ gtk3 libxfce4ui_gtk3 xfce4panel_gtk3 ]
|
2018-03-12 23:55:30 +01:00
|
|
|
else [ gtk libxfce4ui xfce4-panel ]);
|
2016-06-09 14:44:20 +02:00
|
|
|
|
|
|
|
postPatch = lib.optionalString withGtk3 ''
|
|
|
|
substituteInPlace configure --replace gio-2.0 gio-unix-2.0
|
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = lib.optionalString withGtk3 ''
|
|
|
|
substituteInPlace src/Makefile --replace "xfce4_power_manager_CFLAGS = " "xfce4_power_manager_CFLAGS = \$(GIO_CFLAGS) "
|
|
|
|
substituteInPlace settings/Makefile --replace "xfce4_power_manager_settings_CFLAGS = " "xfce4_power_manager_settings_CFLAGS = \$(GIO_CFLAGS) "
|
|
|
|
'';
|
2011-08-23 00:51:23 +02:00
|
|
|
|
2015-10-14 13:23:37 +02:00
|
|
|
meta = with stdenv.lib; {
|
2011-08-23 00:51:23 +02:00
|
|
|
homepage = http://goodies.xfce.org/projects/applications/xfce4-power-manager;
|
|
|
|
description = "A power manager for the Xfce Desktop Environment";
|
2015-10-14 13:23:37 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.eelco ];
|
2011-08-23 00:51:23 +02:00
|
|
|
};
|
|
|
|
}
|
2015-10-14 13:23:37 +02:00
|
|
|
|