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

39 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkg-config, xorg
, enableAlsaUtils ? true, alsa-utils, coreutils
2021-03-14 16:05:16 +00:00
, enableNetwork ? true, dnsutils, iproute2, wirelesstools }:
2018-12-01 16:03:40 +00:00
let
bins = lib.optionals enableAlsaUtils [ alsa-utils coreutils ]
2021-03-14 16:05:16 +00:00
++ lib.optionals enableNetwork [ dnsutils iproute2 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";
version = "1.7.2";
2018-06-10 23:24:13 +01:00
src = fetchFromGitHub {
owner = "Gerschtli";
repo = pname;
rev = version;
sha256 = "sha256-Y1J0nCVEmGKgQP+GEtPqK8l3SRuls5yesvJuowLDzUo=";
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
cargoSha256 = "sha256-8/vzJXZjSQmefHMo5BXKTRiLy2F3wfIn8VgPMJxtIvY=";
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 ];
mainProgram = pname;
2018-06-10 23:24:13 +01:00
platforms = platforms.linux;
};
}