about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2018-06-12 19:34:19 +0200
committerGitHub <noreply@github.com>2018-06-12 19:34:19 +0200
commita964d29f49ed02a269f025c3b4b424d58fbb30e5 (patch)
tree383045957a5a873779166e4b32eccd2e67ce99f7 /pkgs/applications
parentce0f4a1b9383667ad6ac6c2b61a435e0bf650892 (diff)
parent4d486949019bf51691228a09ee21cbab69982dc4 (diff)
downloadnixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.tar
nixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.tar.gz
nixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.tar.bz2
nixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.tar.lz
nixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.tar.xz
nixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.tar.zst
nixlib-a964d29f49ed02a269f025c3b4b424d58fbb30e5.zip
Merge pull request #41815 from Gerschtli/fix/dwm-status
dwm-status: add xsetroot and alsaUtils as runtime deps
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/window-managers/dwm/dwm-status.nix20
1 files changed, 13 insertions, 7 deletions
diff --git a/pkgs/applications/window-managers/dwm/dwm-status.nix b/pkgs/applications/window-managers/dwm/dwm-status.nix
index a8d69987e337..4a46d4ef7ba8 100644
--- a/pkgs/applications/window-managers/dwm/dwm-status.nix
+++ b/pkgs/applications/window-managers/dwm/dwm-status.nix
@@ -1,4 +1,9 @@
-{ stdenv, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, pkgconfig }:
+{ 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}";
@@ -11,15 +16,16 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0nw0iz78mnrmgpc471yjv7yzsaf7346mwjp6hm5kbsdclvrdq9d7";
   };
 
-  buildInputs = [
-    dbus
-    gdk_pixbuf
-    libnotify
-    pkgconfig
-  ];
+  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;