summary refs log tree commit diff
path: root/pkgs/applications/window-managers/dwm/dwm-status.nix
blob: 4a46d4ef7ba8904fc78d73d55a84da27f9af83b3 (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
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg, alsaUtils }:

let
  runtimeDeps = [ xorg.xsetroot ]
    ++ lib.optional (alsaUtils != null) alsaUtils;
in

rustPlatform.buildRustPackage rec {
  name = "dwm-status-${version}";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "Gerschtli";
    repo = "dwm-status";
    rev = version;
    sha256 = "0nw0iz78mnrmgpc471yjv7yzsaf7346mwjp6hm5kbsdclvrdq9d7";
  };

  nativeBuildInputs = [ makeWrapper pkgconfig ];
  buildInputs = [ dbus gdk_pixbuf libnotify ];

  cargoSha256 = "0169k91pb7ipvi0m71cmkppp1klgp5ghampa7x0fxkyrvrf0dvqg";

  postInstall = ''
    wrapProgram $out/bin/dwm-status \
      --prefix "PATH" : "${stdenv.lib.makeBinPath runtimeDeps}"
  '';

  meta = with stdenv.lib; {
    description = "DWM status service which dynamically updates when needed";
    homepage = https://github.com/Gerschtli/dwm-status;
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ gerschtli ];
    platforms = platforms.linux;
  };
}