2021-02-05 17:12:51 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkg-config, xorg
|
2021-06-28 23:13:55 +00:00
|
|
|
, enableAlsaUtils ? true, alsa-utils, coreutils
|
2021-04-05 15:23:46 +00:00
|
|
|
, enableNetwork ? true, dnsutils, iproute2, wirelesstools }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-06-28 23:13:55 +00:00
|
|
|
bins = lib.optionals enableAlsaUtils [ alsa-utils coreutils ]
|
2021-04-05 15:23:46 +00:00
|
|
|
++ lib.optionals enableNetwork [ dnsutils iproute2 wirelesstools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "dwm-status";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Gerschtli";
|
2021-05-20 23:08:51 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-BCnEnBB0OCUwvhh4XEI2eOzfy34VHNFzbqqW26X6If0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
cargoSha256 = "sha256-ylB0XGmIPW7Dbc6eDS8FZsq1AOOqntx1byaH3XIal0I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = lib.optionalString (bins != []) ''
|
2021-01-17 00:15:33 +00:00
|
|
|
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${lib.makeBinPath bins}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Highly performant and configurable DWM status service";
|
|
|
|
homepage = "https://github.com/Gerschtli/dwm-status";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
2021-05-20 23:08:51 +00:00
|
|
|
mainProgram = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|