37 lines
1.2 KiB
Nix
37 lines
1.2 KiB
Nix
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkgconfig, xorg
|
|
, enableAlsaUtils ? true, alsaUtils, coreutils
|
|
, enableNetwork ? true, dnsutils, iproute, wirelesstools }:
|
|
|
|
let
|
|
bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ]
|
|
++ lib.optionals enableNetwork [ dnsutils iproute wirelesstools ];
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "dwm-status";
|
|
version = "1.6.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Gerschtli";
|
|
repo = "dwm-status";
|
|
rev = version;
|
|
sha256 = "05dhd2gy7ysrnchdimrdd7jvzs1db9fyrk4ci7850jhrgavfd7c4";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
|
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
|
|
|
|
cargoSha256 = "0zkbps8vsjcvy7x0sgb07kacszi57dlyq8j6ia6yy0jyqnvlaqa7";
|
|
|
|
postInstall = lib.optionalString (bins != []) ''
|
|
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${stdenv.lib.makeBinPath bins}"
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Highly performant and configurable DWM status service";
|
|
homepage = "https://github.com/Gerschtli/dwm-status";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|