2018-06-11 00:57:59 +01:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg, alsaUtils }:
|
|
|
|
|
|
|
|
let
|
|
|
|
runtimeDeps = [ xorg.xsetroot ]
|
|
|
|
++ lib.optional (alsaUtils != null) alsaUtils;
|
|
|
|
in
|
2018-06-10 23:24:13 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "dwm-status-${version}";
|
|
|
|
version = "0.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Gerschtli";
|
|
|
|
repo = "dwm-status";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0nw0iz78mnrmgpc471yjv7yzsaf7346mwjp6hm5kbsdclvrdq9d7";
|
|
|
|
};
|
|
|
|
|
2018-06-11 00:57:59 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
|
|
|
buildInputs = [ dbus gdk_pixbuf libnotify ];
|
2018-06-10 23:24:13 +01:00
|
|
|
|
|
|
|
cargoSha256 = "0169k91pb7ipvi0m71cmkppp1klgp5ghampa7x0fxkyrvrf0dvqg";
|
|
|
|
|
2018-06-11 00:57:59 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/dwm-status \
|
|
|
|
--prefix "PATH" : "${stdenv.lib.makeBinPath runtimeDeps}"
|
|
|
|
'';
|
|
|
|
|
2018-06-10 23:24:13 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|