@@ -1,4 +1,9 @@
1−{ stdenv, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, pkgconfig }:
1+{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg, alsaUtils }:
2+
3+let
4+ runtimeDeps = [ xorg.xsetroot ]
5+ ++ lib.optional (alsaUtils != null) alsaUtils;
6+in
27
38rustPlatform.buildRustPackage rec {
49 name = "dwm-status-${version}";
@@ -11,15 +16,16 @@ rustPlatform.buildRustPackage rec {
1116 sha256 = "0nw0iz78mnrmgpc471yjv7yzsaf7346mwjp6hm5kbsdclvrdq9d7";
1217 };
1318
14− buildInputs = [
15− dbus
16− gdk_pixbuf
17− libnotify
18− pkgconfig
19− ];
19+ nativeBuildInputs = [ makeWrapper pkgconfig ];
20+ buildInputs = [ dbus gdk_pixbuf libnotify ];
2021
2122 cargoSha256 = "0169k91pb7ipvi0m71cmkppp1klgp5ghampa7x0fxkyrvrf0dvqg";
2223
24+ postInstall = ''
25+ wrapProgram $out/bin/dwm-status \
26+ --prefix "PATH" : "${stdenv.lib.makeBinPath runtimeDeps}"
27+ '';
28+
2329 meta = with stdenv.lib; {
2430 description = "DWM status service which dynamically updates when needed";
2531 homepage = https://github.com/Gerschtli/dwm-status;