python.pkgs.py3status: move to python-modules

This commit is contained in:
Jörg Thalheim 2018-04-09 06:56:32 +01:00
parent e1630344b0
commit 5386ece072
2 changed files with 49 additions and 28 deletions

View File

@ -0,0 +1,48 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, requests
, pytz
, tzlocal
, file
, acpi
, coreutils
, alsaUtils
, i3
, procps
, lm_sensors
, libnotify
, xorg
}:
buildPythonPackage rec {
pname = "py3status";
version = "3.8";
src = fetchPypi {
inherit pname version;
sha256 = "1izjpf9q768m3j95y328vbdh7rycglqlslyd777b12c13i6zs6cb";
};
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 ];
};
}

View File

@ -6218,34 +6218,7 @@ in {
};
py3status = buildPythonPackage rec {
version = "3.8";
name = "py3status-${version}";
src = pkgs.fetchFromGitHub {
owner = "ultrabug";
repo = "py3status";
rev = version;
sha256 = "0454g6zmhgpaag5cj16jarp9bm6h0cf9r3pbkjq2j9wa7rynp3l4";
};
doCheck = false;
propagatedBuildInputs = with self; [ pytz requests tzlocal ];
buildInputs = with pkgs; [ file ];
prePatch = ''
sed -i -e "s|'file|'${pkgs.file}/bin/file|" py3status/parse_config.py
sed -i -e "s|\[\"acpi\"|\[\"${pkgs.acpi}/bin/acpi\"|" py3status/modules/battery_level.py
sed -i -e "s|notify-send|${pkgs.libnotify}/bin/notify-send|" py3status/modules/battery_level.py
sed -i -e "s|/usr/bin/whoami|${pkgs.coreutils}/bin/whoami|" py3status/modules/external_script.py
sed -i -e "s|'amixer|'${pkgs.alsaUtils}/bin/amixer|" py3status/modules/volume_status.py
sed -i -e "s|'i3-nagbar|'${pkgs.i3}/bin/i3-nagbar|" py3status/modules/pomodoro.py
sed -i -e "s|'free|'${pkgs.procps}/bin/free|" py3status/modules/sysdata.py
sed -i -e "s|'sensors|'${pkgs.lm_sensors}/bin/sensors|" py3status/modules/sysdata.py
sed -i -e "s|'setxkbmap|'${pkgs.xorg.setxkbmap}/bin/setxkbmap|" py3status/modules/keyboard_layout.py
sed -i -e "s|'xset|'${pkgs.xorg.xset}/bin/xset|" py3status/modules/keyboard_layout.py
'';
meta = {
maintainers = with maintainers; [ garbas ];
};
};
py3status = callPackage ../development/python-modules/py3status {};
multi_key_dict = buildPythonPackage rec {
name = "multi_key_dict-${version}";