about summary refs log tree commit diff
path: root/pkgs/desktops/gnome/apps/gnome-power-manager/default.nix
blob: 0f630593101b568df256488c0ee9f3d59e18ede4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ stdenv
, lib
, gettext
, fetchurl
, pkg-config
, gtk3
, glib
, meson
, ninja
, upower
, python3
, desktop-file-utils
, wrapGAppsHook3
, gnome
}:

stdenv.mkDerivation rec {
  pname = "gnome-power-manager";
  version = "43.0";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-power-manager/${lib.versions.major version}/gnome-power-manager-${version}.tar.xz";
    sha256 = "faq0i73bMOnfKrplDLYNBeZnyfiFrOagoeeVDgy90y8=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    wrapGAppsHook3
    gettext

    # needed by meson_post_install.sh
    python3
    glib
    desktop-file-utils
  ];

  buildInputs = [
    gtk3
    glib
    upower
  ];

  passthru = {
    updateScript = gnome.updateScript {
      packageName = "gnome-power-manager";
      attrPath = "gnome.gnome-power-manager";
    };
  };

  meta = with lib; {
    homepage = "https://gitlab.gnome.org/GNOME/gnome-power-manager";
    description = "View battery and power statistics provided by UPower";
    mainProgram = "gnome-power-statistics";
    maintainers = teams.gnome.members;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
  };
}