2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, pytz
|
|
|
|
, tzlocal
|
|
|
|
, i3ipc
|
|
|
|
, pydbus
|
|
|
|
, pygobject3
|
|
|
|
, pyserial
|
|
|
|
, setuptools
|
|
|
|
, dbus-python
|
|
|
|
|
|
|
|
, file
|
|
|
|
, acpi
|
|
|
|
, coreutils
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
, i3
|
|
|
|
, procps
|
|
|
|
, lm_sensors
|
|
|
|
, libnotify
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py3status";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "3.40";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "9eb6f721f94f28a17a8599ca2743a2bedd58c16cfe74e9817ffa948c13dbb79c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
propagatedBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pytz requests tzlocal i3ipc pydbus pygobject3 pyserial setuptools dbus-python file
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
prePatch = ''
|
|
|
|
sed -i -e "s|'file|'${file}/bin/file|" py3status/parse_config.py
|
|
|
|
sed -i -e "s|\[\"acpi\"|\[\"${acpi}/bin/acpi\"|" py3status/modules/battery_level.py
|
|
|
|
sed -i -e "s|notify-send|${libnotify}/bin/notify-send|" py3status/modules/battery_level.py
|
|
|
|
sed -i -e "s|/usr/bin/whoami|${coreutils}/bin/whoami|" py3status/modules/external_script.py
|
2021-06-28 23:13:55 +00:00
|
|
|
sed -i -e "s|'amixer|'${alsa-utils}/bin/amixer|" py3status/modules/volume_status.py
|
2020-04-24 23:36:52 +00:00
|
|
|
sed -i -e "s|'i3-nagbar|'${i3}/bin/i3-nagbar|" py3status/modules/pomodoro.py
|
|
|
|
sed -i -e "s|'free|'${procps}/bin/free|" py3status/modules/sysdata.py
|
|
|
|
sed -i -e "s|'sensors|'${lm_sensors}/bin/sensors|" py3status/modules/sysdata.py
|
|
|
|
sed -i -e "s|'setxkbmap|'${xorg.setxkbmap}/bin/setxkbmap|" py3status/modules/keyboard_layout.py
|
|
|
|
sed -i -e "s|'xset|'${xorg.xset}/bin/xset|" py3status/modules/keyboard_layout.py
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extensible i3status wrapper";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://github.com/ultrabug/py3status";
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|