about summary refs log tree commit diff
path: root/pkgs/misc/plasma-hud/default.nix
blob: b0adf0e1efc693c735343b75c0bbdbff17c3a7dd (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
{ wrapGAppsHook
, lib
, python3Packages
, fetchFromGitHub
, rofi
, gobject-introspection
}:

python3Packages.buildPythonApplication rec {
  pname = "plasma-hud";
  version = "19.10.1";
  format = "other";

  src = fetchFromGitHub {
    owner = "Zren";
    repo = "plasma-hud";
    rev = version;
    hash = "sha256-1AQtgVlrmzBkim1kVZzTAwJHq0OH3YAPr6o5aUpgdKc=";
  };

  nativeBuildInputs = [
    gobject-introspection
    wrapGAppsHook
  ];

  propagatedBuildInputs = (with python3Packages; [
    dbus-python
    pygobject3
    setproctitle
    xlib
  ]) ++ [ rofi ];

  postPatch = ''
    sed -i "s:/usr/lib/plasma-hud:$out/bin:" etc/xdg/autostart/plasma-hud.desktop
  '';

  installPhase = ''
    runHook preInstall

    install -Dm555 usr/lib/plasma-hud/plasma-hud -t $out/bin
    cp -r etc -t $out

    runHook postInstall
  '';

  meta = {
    license = lib.licenses.gpl2Only;
    homepage = "https://github.com/Zren/plasma-hud";
    platforms = lib.platforms.unix;
    description = "Run menubar commands, much like the Unity 7 Heads-Up Display (HUD)";
    maintainers = with lib.maintainers; [ pasqui23 ];
    mainProgram = "plasma-hud";
  };
}