2019-05-22 12:03:39 +01:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkgconfig, xorg
|
2018-12-27 18:58:43 +00:00
|
|
|
, enableAlsaUtils ? true, alsaUtils, coreutils
|
|
|
|
, enableNetwork ? true, dnsutils, iproute, wirelesstools }:
|
2018-12-01 16:03:40 +00:00
|
|
|
|
|
|
|
let
|
2018-12-27 18:58:43 +00:00
|
|
|
bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ]
|
|
|
|
++ lib.optionals enableNetwork [ dnsutils iproute wirelesstools ];
|
2018-12-01 16:03:40 +00:00
|
|
|
in
|
2018-06-11 00:57:59 +01:00
|
|
|
|
2018-06-10 23:24:13 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "dwm-status-${version}";
|
2019-07-23 19:29:23 +01:00
|
|
|
version = "1.6.2";
|
2018-06-10 23:24:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Gerschtli";
|
|
|
|
repo = "dwm-status";
|
|
|
|
rev = version;
|
2019-07-23 19:29:23 +01:00
|
|
|
sha256 = "16vf7val1isc4227amng2ap9af34xa2va23dxv43px006xhrar78";
|
2018-06-10 23:24:13 +01:00
|
|
|
};
|
|
|
|
|
2018-06-11 00:57:59 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
2019-05-22 12:03:39 +01:00
|
|
|
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
|
2018-06-10 23:24:13 +01:00
|
|
|
|
2019-07-23 19:29:23 +01:00
|
|
|
cargoSha256 = "0pprf8509d321azg2l51lpxylgpk7290y38z9p5hxgkcwhrhrcss";
|
2018-06-10 23:24:13 +01:00
|
|
|
|
2018-12-27 18:58:43 +00:00
|
|
|
postInstall = lib.optionalString (bins != []) ''
|
|
|
|
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${stdenv.lib.makeBinPath bins}"
|
2018-06-11 00:57:59 +01:00
|
|
|
'';
|
|
|
|
|
2018-06-10 23:24:13 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-06-28 12:10:37 +01:00
|
|
|
description = "Highly performant and configurable DWM status service";
|
2018-06-10 23:24:13 +01:00
|
|
|
homepage = https://github.com/Gerschtli/dwm-status;
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|