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

38 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkg-config, xorg
2018-12-27 18:58:43 +00:00
, enableAlsaUtils ? true, alsaUtils, coreutils
, enableNetwork ? true, dnsutils, iproute, wirelesstools }:
2018-12-01 16:03:40 +00:00
let
2018-12-27 18:58:43 +00:00
bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ]
++ lib.optionals enableNetwork [ dnsutils iproute wirelesstools ];
2018-12-01 16:03:40 +00:00
in
2018-06-10 23:24:13 +01:00
rustPlatform.buildRustPackage rec {
2019-08-31 12:41:23 +01:00
pname = "dwm-status";
2020-07-06 17:59:13 +01:00
version = "1.7.1";
2018-06-10 23:24:13 +01:00
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
2020-07-06 17:59:13 +01:00
sha256 = "172qkzbi37j6wx81pyqqffi9wxbg3bf8nis7d15ncn1yfd5r4gqh";
2018-06-10 23:24:13 +01:00
};
nativeBuildInputs = [ makeWrapper pkg-config ];
2019-05-22 12:03:39 +01:00
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
2018-06-10 23:24:13 +01:00
2020-07-06 17:59:13 +01:00
cargoSha256 = "041sd9zm1c3v6iihnwjcya2xg5yxb2y4biyxpjlfblz2srxa15dm";
2018-06-10 23:24:13 +01:00
2018-12-27 18:58:43 +00:00
postInstall = lib.optionalString (bins != []) ''
2021-01-15 13:21:58 +00:00
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${lib.makeBinPath bins}"
'';
meta = with lib; {
2018-06-28 12:10:37 +01:00
description = "Highly performant and configurable DWM status service";
homepage = "https://github.com/Gerschtli/dwm-status";
2018-06-10 23:24:13 +01:00
license = with licenses; [ mit ];
maintainers = with maintainers; [ gerschtli ];
platforms = platforms.linux;
};
}