about summary refs log tree commit diff
path: root/pkgs/by-name/po/powersupply/package.nix
blob: ce86cf2da7d0ca0fac77e7aae04ea1aa392cff03 (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
61
62
{ lib
, python3
, fetchFromGitLab
, desktop-file-utils
, gobject-introspection
, gtk3
, libhandy
, meson
, ninja
, pkg-config
, wrapGAppsHook
}:

python3.pkgs.buildPythonApplication rec {
  pname = "powersupply";
  version = "0.9.0";

  format = "other";

  src = fetchFromGitLab {
    owner = "martijnbraam";
    repo = "powersupply";
    rev = version;
    hash = "sha256-3NXoOqveMlMezYe4C78F3764KeAy5Sz3M714PO3h/eI=";
  };

  nativeBuildInputs = [
    desktop-file-utils
    gtk3
    gobject-introspection
    meson
    ninja
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    gtk3
    libhandy
  ];

  propagatedBuildInputs = with python3.pkgs; [
    pygobject3
  ];

  dontWrapGApps = true;

  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  strictDeps = true;

  meta = with lib; {
    description = "Graphical app to display power status of mobile Linux platforms";
    homepage = "https://gitlab.com/MartijnBraam/powersupply";
    license = licenses.mit;
    mainProgram = "powersupply";
    platforms = platforms.linux;
    maintainers = with maintainers; [ Luflosi ];
  };
}