nixpkgs/pkgs/applications/window-managers/dwm/dwm-status.nix

33 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg, alsaUtils }:
2018-06-10 22:24:13 +00:00
rustPlatform.buildRustPackage rec {
name = "dwm-status-${version}";
2018-06-15 20:40:11 +00:00
version = "0.5.1";
2018-06-10 22:24:13 +00:00
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
2018-06-15 20:40:11 +00:00
sha256 = "1mppj57h5yr0azypf5d2cgz2wv3k52mg3k4npyfhbmfy1393qbjs";
2018-06-10 22:24:13 +00:00
};
nativeBuildInputs = [ makeWrapper pkgconfig ];
2018-06-15 20:40:11 +00:00
buildInputs = [ dbus gdk_pixbuf libnotify xorg.libX11 ];
2018-06-10 22:24:13 +00:00
2018-06-15 20:40:11 +00:00
cargoSha256 = "0qr999hwrqn7a4n4kvbrpli7shxp9jchj8csxzsw951qmzq32qwv";
2018-06-10 22:24:13 +00:00
2018-06-15 20:40:11 +00:00
# needed because alsaUtils is an optional runtime dependency
postInstall = lib.optionalString (alsaUtils != null) ''
wrapProgram $out/bin/dwm-status \
2018-06-15 20:40:11 +00:00
--prefix "PATH" : "${alsaUtils}/bin"
'';
2018-06-10 22:24:13 +00: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;
};
}