nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, python3, fetchFromGitHub, rofi, gobject-introspection }:
2
3python3.pkgs.buildPythonApplication rec{
4 pname = "plasma-hud";
5 version = "19.10.1";
6
7 src = fetchFromGitHub {
8 owner = "Zren";
9 repo = pname;
10 rev = version;
11 sha256 = "19vlc156jfdamw7q1pc78fmlf0h3sff5ar3di9j316vbb60js16l";
12 };
13
14 propagatedBuildInputs = with python3.pkgs; [
15 rofi
16 dbus-python
17 setproctitle
18 xlib
19 pygobject3
20 gobject-introspection
21 ];
22 format = "other";
23 postPatch = ''
24 sed -i "s:/usr/lib/plasma-hud:$out/bin:" etc/xdg/autostart/plasma-hud.desktop
25 '';
26
27 installPhase = ''
28 patchShebangs $out/bin/plasma-hud
29 mkdir -p $out/bin $out/etc/xdg/autostart
30 cp -r $src/usr/lib/plasma-hud/plasma-hud $out/bin/plasma-hud
31 cp -r $src/etc $out/etc
32 '';
33
34 meta = with lib;{
35 license = licenses.gpl2Only;
36 homepage = "https://github.com/Zren/plasma-hud";
37 platforms = platforms.unix;
38 description = "Run menubar commands, much like the Unity 7 Heads-Up Display (HUD)";
39 maintainers = with maintainers; [ pasqui23 ];
40 };
41}