2021-01-25 09:26:54 +01:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkg-config, xorg
|
2018-12-27 19:58:43 +01:00
|
|
|
, enableAlsaUtils ? true, alsaUtils, coreutils
|
2021-03-14 17:05:16 +01:00
|
|
|
, enableNetwork ? true, dnsutils, iproute2, wirelesstools }:
|
2018-12-01 17:03:40 +01:00
|
|
|
|
|
|
|
let
|
2018-12-27 19:58:43 +01:00
|
|
|
bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ]
|
2021-03-14 17:05:16 +01:00
|
|
|
++ lib.optionals enableNetwork [ dnsutils iproute2 wirelesstools ];
|
2018-12-01 17:03:40 +01:00
|
|
|
in
|
2018-06-11 01:57:59 +02:00
|
|
|
|
2018-06-11 00:24:13 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 13:41:23 +02:00
|
|
|
pname = "dwm-status";
|
2021-05-08 16:55:30 +02:00
|
|
|
version = "1.7.2";
|
2018-06-11 00:24:13 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Gerschtli";
|
2021-05-08 07:05:15 +02:00
|
|
|
repo = pname;
|
2021-05-08 16:55:30 +02:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-Y1J0nCVEmGKgQP+GEtPqK8l3SRuls5yesvJuowLDzUo=";
|
2018-06-11 00:24:13 +02:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2019-05-22 13:03:39 +02:00
|
|
|
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
|
2018-06-11 00:24:13 +02:00
|
|
|
|
2021-05-08 16:55:30 +02:00
|
|
|
cargoSha256 = "sha256-8/vzJXZjSQmefHMo5BXKTRiLy2F3wfIn8VgPMJxtIvY=";
|
2018-06-11 00:24:13 +02:00
|
|
|
|
2018-12-27 19:58:43 +01:00
|
|
|
postInstall = lib.optionalString (bins != []) ''
|
2021-01-15 14:21:58 +01:00
|
|
|
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${lib.makeBinPath bins}"
|
2018-06-11 01:57:59 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-06-28 13:10:37 +02:00
|
|
|
description = "Highly performant and configurable DWM status service";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/Gerschtli/dwm-status";
|
2018-06-11 00:24:13 +02:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
2021-05-08 07:05:15 +02:00
|
|
|
mainProgram = pname;
|
2018-06-11 00:24:13 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|