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

python3.pkgs.buildPythonApplication rec{
  pname = "plasma-hud";
  version = "19.10.1";

  src = fetchFromGitHub {
    owner = "Zren";
    repo = pname;
    rev = version;
    sha256 = "19vlc156jfdamw7q1pc78fmlf0h3sff5ar3di9j316vbb60js16l";
  };

  propagatedBuildInputs = with python3.pkgs; [
    rofi
    dbus-python
    setproctitle
    xlib
    pygobject3
    gobject-introspection
  ];
  format = "other";
  postPatch = ''
    sed -i "s:/usr/lib/plasma-hud:$out/bin:" etc/xdg/autostart/plasma-hud.desktop
  '';

  installPhase = ''
    patchShebangs $out/bin/plasma-hud
    mkdir -p $out/bin $out/etc/xdg/autostart
    cp -r $src/usr/lib/plasma-hud/plasma-hud $out/bin/plasma-hud
    cp -r $src/etc $out/etc
  '';

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