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