2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-11-06 00:33:48 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-11-06 00:33:48 +00:00
|
|
|
, makeWrapper
|
|
|
|
, dbus
|
|
|
|
, libpulseaudio
|
|
|
|
, notmuch
|
2021-03-09 03:18:52 +00:00
|
|
|
, openssl
|
2020-11-06 00:33:48 +00:00
|
|
|
, ethtool
|
2022-02-10 20:34:41 +00:00
|
|
|
, lm_sensors
|
|
|
|
, iw
|
|
|
|
, iproute2
|
2020-11-06 00:33:48 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "i3status-rust";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "0.22.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greshake";
|
|
|
|
repo = pname;
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-9Fp5k14QkV1CwLSL1nUUu6NYIpjfvI9vNJRYNqvyr3M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
cargoSha256 = "sha256-MzosatZ4yPHAdANqOBPVW2wpjnojLo9B9N9o4DtU0Iw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [ dbus libpulseaudio notmuch openssl lm_sensors ];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildFeatures = [
|
|
|
|
"notmuch"
|
|
|
|
"maildir"
|
|
|
|
"pulseaudio"
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace src/util.rs \
|
|
|
|
--replace "/usr/share/i3status-rust" "$out/share"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
2021-09-18 10:52:07 +00:00
|
|
|
cp -R examples files/* $out/share
|
2021-05-20 23:08:51 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
postFixup = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [ iproute2 ethtool iw ]}
|
2020-11-06 00:33:48 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Currently no tests are implemented, so we avoid building the package twice
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Very resource-friendly and feature-rich replacement for i3status";
|
|
|
|
homepage = "https://github.com/greshake/i3status-rust";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ backuitist globin ma27 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|