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";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.30.7";
|
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}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-mxkwAKfra2btUa/l3TjJac68SmzyGwjmz4HD2yN/U8U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
cargoHash = "sha256-jJ9JrpEJyk3Cg7YCZadESR0+9vB+ZdTQhG2affoCdx4=";
|
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;
|
2023-03-27 19:17:25 +00:00
|
|
|
mainProgram = "i3status-rs";
|
2023-01-20 10:41:00 +00:00
|
|
|
maintainers = with maintainers; [ backuitist globin ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|