2021-01-25 00:26:54 -08:00
|
|
|
{ lib
|
2020-11-03 16:14:28 -08:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2021-01-18 22:50:56 -08:00
|
|
|
, pkg-config
|
2020-11-03 16:14:28 -08:00
|
|
|
, makeWrapper
|
|
|
|
, dbus
|
|
|
|
, libpulseaudio
|
|
|
|
, notmuch
|
2021-02-28 08:24:14 -08:00
|
|
|
, openssl
|
2020-11-03 16:14:28 -08:00
|
|
|
, ethtool
|
|
|
|
}:
|
2017-11-13 12:37:02 -08:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-05-06 12:32:03 -07:00
|
|
|
pname = "i3status-rust";
|
2021-02-28 08:24:14 -08:00
|
|
|
version = "0.14.7";
|
2017-11-13 12:37:02 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greshake";
|
2019-05-06 12:32:03 -07:00
|
|
|
repo = pname;
|
2019-07-15 12:53:46 -07:00
|
|
|
rev = "v${version}";
|
2021-02-28 08:24:14 -08:00
|
|
|
sha256 = "1ndqh4bzwim32n8psgsgdd47xmlb45rhvcwla1wm506byb21nk4c";
|
2017-11-13 12:37:02 -08:00
|
|
|
};
|
|
|
|
|
2021-02-28 08:24:14 -08:00
|
|
|
cargoSha256 = "098dzwqwbhcyswm73m880z0w03i7xrq56x79vfyvacw4k27q2zm9";
|
2017-11-13 12:37:02 -08:00
|
|
|
|
2021-01-18 22:50:56 -08:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2017-11-13 12:37:02 -08:00
|
|
|
|
2021-02-28 08:24:14 -08:00
|
|
|
buildInputs = [ dbus libpulseaudio notmuch openssl ];
|
2020-11-03 16:14:28 -08:00
|
|
|
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"--features=notmuch"
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/i3status-rs --prefix PATH : "${ethtool}/bin"
|
|
|
|
'';
|
2019-02-17 09:19:26 -08:00
|
|
|
|
|
|
|
# Currently no tests are implemented, so we avoid building the package twice
|
|
|
|
doCheck = false;
|
2017-11-13 12:37:02 -08:00
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2017-11-13 12:37:02 -08:00
|
|
|
description = "Very resource-friendly and feature-rich replacement for i3status";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/greshake/i3status-rust";
|
2017-11-13 12:37:02 -08:00
|
|
|
license = licenses.gpl3;
|
2020-02-02 22:04:38 -08:00
|
|
|
maintainers = with maintainers; [ backuitist globin ma27 ];
|
2017-11-13 12:37:02 -08:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|