2018-06-26 20:29:18 +01:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg
|
|
|
|
, enableAlsaUtils ? true, alsaUtils }:
|
2018-06-11 00:57:59 +01:00
|
|
|
|
2018-06-10 23:24:13 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "dwm-status-${version}";
|
2018-06-26 20:29:18 +01:00
|
|
|
version = "1.0.0";
|
2018-06-10 23:24:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Gerschtli";
|
|
|
|
repo = "dwm-status";
|
|
|
|
rev = version;
|
2018-06-26 20:29:18 +01:00
|
|
|
sha256 = "0r0irzm5y9xvqxrr8gvvn4x9c56qwgynljnzba4mh5s5dpbmz0iq";
|
2018-06-10 23:24:13 +01:00
|
|
|
};
|
|
|
|
|
2018-06-11 00:57:59 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
2018-06-15 21:40:11 +01:00
|
|
|
buildInputs = [ dbus gdk_pixbuf libnotify xorg.libX11 ];
|
2018-06-10 23:24:13 +01:00
|
|
|
|
2018-06-26 20:29:18 +01:00
|
|
|
cargoSha256 = "13ibcbk8shfajk200d8v2p6y3zfrz5dlvxqfw1zsm630s5dmy6qx";
|
2018-06-10 23:24:13 +01:00
|
|
|
|
2018-06-26 20:29:18 +01:00
|
|
|
postInstall = lib.optionalString enableAlsaUtils ''
|
2018-06-11 00:57:59 +01:00
|
|
|
wrapProgram $out/bin/dwm-status \
|
2018-06-15 21:40:11 +01:00
|
|
|
--prefix "PATH" : "${alsaUtils}/bin"
|
2018-06-11 00:57:59 +01:00
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|