2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-04-09 05:56:32 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, pytz
|
|
|
|
, tzlocal
|
2019-03-23 11:23:28 +00:00
|
|
|
, i3ipc
|
|
|
|
, pydbus
|
|
|
|
, pygobject3
|
|
|
|
, pyserial
|
2019-10-09 11:26:48 +00:00
|
|
|
, setuptools
|
2019-10-30 13:02:25 +00:00
|
|
|
, dbus-python
|
2018-04-09 05:56:32 +00:00
|
|
|
|
|
|
|
, file
|
|
|
|
, acpi
|
|
|
|
, coreutils
|
|
|
|
, alsaUtils
|
|
|
|
, i3
|
|
|
|
, procps
|
|
|
|
, lm_sensors
|
|
|
|
, libnotify
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py3status";
|
2021-03-24 09:28:21 +00:00
|
|
|
version = "3.35";
|
2019-03-23 11:23:28 +00:00
|
|
|
|
2018-04-09 05:56:32 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 09:28:21 +00:00
|
|
|
sha256 = "1508fa481a2f1b55b9a9792f0480c7f54cad107c668ffc98a7c73622676e1c23";
|
2018-09-05 21:28:31 +00:00
|
|
|
};
|
|
|
|
|
2018-04-09 05:56:32 +00:00
|
|
|
doCheck = false;
|
2019-10-09 11:26:48 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-01-18 19:21:24 +00:00
|
|
|
pytz requests tzlocal i3ipc pydbus pygobject3 pyserial setuptools dbus-python file
|
2019-10-09 11:26:48 +00:00
|
|
|
];
|
2018-04-09 05:56:32 +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
|
|
|
|
sed -i -e "s|'amixer|'${alsaUtils}/bin/amixer|" py3status/modules/volume_status.py
|
|
|
|
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-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-09 05:56:32 +00:00
|
|
|
description = "Extensible i3status wrapper";
|
|
|
|
license = licenses.bsd3;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ultrabug/py3status";
|
2019-07-03 09:27:39 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-04-09 05:56:32 +00:00
|
|
|
};
|
|
|
|
}
|