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

41 lines
1.3 KiB
Nix
Raw Normal View History

2019-05-22 11:03:39 +00: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 22:24:13 +00:00
rustPlatform.buildRustPackage rec {
2019-08-31 11:41:23 +00:00
pname = "dwm-status";
2019-09-23 17:04:38 +00:00
version = "1.6.3";
2018-06-10 22:24:13 +00:00
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
2019-09-23 17:04:38 +00:00
sha256 = "02sprsr7822ynkwpf3xdgmkdrgkw3vgijhlh65bayiv3b5lwb54n";
2018-06-10 22:24:13 +00:00
};
nativeBuildInputs = [ makeWrapper pkgconfig ];
2019-05-22 11:03:39 +00:00
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
2018-06-10 22:24:13 +00:00
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
2019-09-23 17:04:38 +00:00
cargoSha256 = "0l6x59bzzilc78gsi5rlgq9zjvp8qjphfsds776ljzmkbdq8q4iz";
2018-06-10 22:24:13 +00: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 22:24:13 +00:00
meta = with stdenv.lib; {
2018-06-28 11:10:37 +00:00
description = "Highly performant and configurable DWM status service";
2018-06-10 22:24:13 +00:00
homepage = https://github.com/Gerschtli/dwm-status;
license = with licenses; [ mit ];
maintainers = with maintainers; [ gerschtli ];
platforms = platforms.linux;
};
}