2018-04-09 06:56:32 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-09-05 22:28:31 +01:00
|
|
|
, fetchpatch
|
2018-04-09 06:56:32 +01:00
|
|
|
, requests
|
|
|
|
, pytz
|
|
|
|
, tzlocal
|
|
|
|
|
|
|
|
, file
|
|
|
|
, acpi
|
|
|
|
, coreutils
|
|
|
|
, alsaUtils
|
|
|
|
, i3
|
|
|
|
, procps
|
|
|
|
, lm_sensors
|
|
|
|
, libnotify
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py3status";
|
2019-01-10 16:38:53 +00:00
|
|
|
version = "3.15";
|
2018-09-05 22:28:31 +01:00
|
|
|
|
2018-04-09 06:56:32 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-01-10 16:38:53 +00:00
|
|
|
sha256 = "78aa7fa0af707641e215ea93bfd4bb5fd47f18a7193d84ed60bb9e6cccb75b7f";
|
2018-09-05 22:28:31 +01:00
|
|
|
};
|
|
|
|
|
2018-04-09 06:56:32 +01:00
|
|
|
doCheck = false;
|
|
|
|
propagatedBuildInputs = [ pytz requests tzlocal ];
|
|
|
|
buildInputs = [ file ];
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Extensible i3status wrapper";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = https://github.com/ultrabug/py3status;
|
|
|
|
maintainers = with maintainers; [ garbas ];
|
|
|
|
};
|
|
|
|
}
|