2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-11-04 00:14:28 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-11-04 00:14:28 +00:00
|
|
|
, makeWrapper
|
|
|
|
, dbus
|
|
|
|
, libpulseaudio
|
|
|
|
, notmuch
|
2021-02-28 16:24:14 +00:00
|
|
|
, openssl
|
2020-11-04 00:14:28 +00:00
|
|
|
, ethtool
|
2022-02-01 20:08:01 +00:00
|
|
|
, lm_sensors
|
2022-01-26 11:59:04 +00:00
|
|
|
, iw
|
|
|
|
, iproute2
|
2020-11-04 00:14:28 +00:00
|
|
|
}:
|
2017-11-13 20:37:02 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-05-06 20:32:03 +01:00
|
|
|
pname = "i3status-rust";
|
2022-04-08 02:59:58 +01:00
|
|
|
version = "0.21.9";
|
2017-11-13 20:37:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greshake";
|
2019-05-06 20:32:03 +01:00
|
|
|
repo = pname;
|
2019-07-15 20:53:46 +01:00
|
|
|
rev = "v${version}";
|
2022-04-08 02:59:58 +01:00
|
|
|
sha256 = "sha256-UbQEPY/Qzu3akWqCTdbhO8V46KyNh/4XCA+PySQyNaw=";
|
2017-11-13 20:37:02 +00:00
|
|
|
};
|
|
|
|
|
2022-04-08 02:59:58 +01:00
|
|
|
cargoSha256 = "sha256-Bb4kkS0eSg0ue24UIy8f0kwD9w4kSCVTd1OqwEggyVs=";
|
2017-11-13 20:37:02 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2017-11-13 20:37:02 +00:00
|
|
|
|
2022-02-01 20:08:01 +00:00
|
|
|
buildInputs = [ dbus libpulseaudio notmuch openssl lm_sensors ];
|
2020-11-04 00:14:28 +00:00
|
|
|
|
2021-11-16 00:00:53 +00:00
|
|
|
buildFeatures = [
|
|
|
|
"notmuch"
|
|
|
|
"maildir"
|
|
|
|
"pulseaudio"
|
2020-11-04 00:14:28 +00:00
|
|
|
];
|
|
|
|
|
2021-05-10 22:23:51 +01:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace src/util.rs \
|
|
|
|
--replace "/usr/share/i3status-rust" "$out/share"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
2021-09-01 15:35:33 +01:00
|
|
|
cp -R examples files/* $out/share
|
2021-05-10 22:23:51 +01:00
|
|
|
'';
|
|
|
|
|
2020-11-04 00:14:28 +00:00
|
|
|
postFixup = ''
|
2022-01-26 11:59:04 +00:00
|
|
|
wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [ iproute2 ethtool iw ]}
|
2020-11-04 00:14:28 +00:00
|
|
|
'';
|
2019-02-17 17:19:26 +00:00
|
|
|
|
|
|
|
# Currently no tests are implemented, so we avoid building the package twice
|
|
|
|
doCheck = false;
|
2017-11-13 20:37:02 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-13 20:37:02 +00:00
|
|
|
description = "Very resource-friendly and feature-rich replacement for i3status";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/greshake/i3status-rust";
|
2022-02-22 22:11:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-02-03 06:04:38 +00:00
|
|
|
maintainers = with maintainers; [ backuitist globin ma27 ];
|
2017-11-13 20:37:02 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|