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

38 lines
1.2 KiB
Nix
Raw Normal View History

2018-06-26 20:29:18 +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-10 23:24:13 +01:00
rustPlatform.buildRustPackage rec {
name = "dwm-status-${version}";
2018-12-27 18:58:43 +00:00
version = "1.6.0";
2018-06-10 23:24:13 +01:00
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
2018-12-27 18:58:43 +00:00
sha256 = "02gvlxv6ylx4mdkf59crm2zyahiz1zd4cr5zz29dnhx7r7738i9a";
2018-06-10 23:24:13 +01:00
};
nativeBuildInputs = [ makeWrapper pkgconfig ];
2018-06-15 21:40:11 +01:00
buildInputs = [ dbus gdk_pixbuf libnotify xorg.libX11 ];
2018-06-10 23:24:13 +01:00
2018-12-27 18:58:43 +00:00
cargoSha256 = "1khknf1bjs80cc2n4jnpilf8cc15crykhhyvvff6q4ay40353gr6";
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-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;
};
}