Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bumblebee-status: init at 2.2.0 #254772

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,12 @@
github = "auchter";
githubId = 1190483;
};
augustebaum = {
email = "[email protected]";
github = "augustebaum";
githubId = 52001167;
name = "Auguste Baum";
};
auntie = {
email = "[email protected]";
github = "auntieNeo";
Expand Down
67 changes: 67 additions & 0 deletions pkgs/applications/window-managers/i3/bumblebee-status/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{ pkgs
, lib
, glibcLocales
, python
, fetchFromGitHub
# Usage: bumblebee-status.override { plugins = p: [p.arandr p.bluetooth2]; };
, plugins ? p: [ ]
}:
let
version = "2.2.0";

# { <name> = { name = "..."; propagatedBuildInputs = [ ... ]; buildInputs = [ ... ]; } }
allPlugins =
lib.mapAttrs
(name: value: value // { inherit name; })
(import ./plugins.nix { inherit pkgs python; });

# [ { name = "..."; propagatedBuildInputs = [ ... ]; buildInputs = [ ... ]; } ]
selectedPlugins = plugins allPlugins;
in
python.pkgs.buildPythonPackage {
pname = "bumblebee-status";
inherit version;

src = fetchFromGitHub {
owner = "tobi-wan-kenobi";
repo = "bumblebee-status";
rev = "v${version}";
hash = "sha256-+RCg2XZv0AJnexi7vnQhEXB1qSoKBN1yKWm3etdys1s=";
};

buildInputs = lib.concatMap (p: p.buildInputs or [ ]) selectedPlugins;
propagatedBuildInputs = lib.concatMap (p: p.propagatedBuildInputs or [ ]) selectedPlugins;

checkInputs = with python.pkgs; [ freezegun netifaces psutil pytest pytest-mock requests ];

checkPhase = ''
runHook preCheck

# Fixes `locale.Error: unsupported locale setting` in some tests.
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive";

# FIXME: We skip the `dunst` module tests, some of which fail with
# `RuntimeError: killall -s SIGUSR2 dunst not found`.
# This is not solved by adding `pkgs.killall` to `checkInputs`.
${python.interpreter} -m pytest -k 'not test_dunst.py'

runHook postCheck
'';

postInstall = ''
# Remove binary cache files
find $out -name "__pycache__" -type d | xargs rm -rv

# Make themes available for bumblebee-status to detect them
cp -r ./themes $out/${python.sitePackages}
'';

meta = with lib; {
description = "A modular, theme-able status line generator for the i3 window manager";
homepage = "https://github.com/tobi-wan-kenobi/bumblebee-status";
mainProgram = "bumblebee-status";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ augustebaum ];
};
}
162 changes: 162 additions & 0 deletions pkgs/applications/window-managers/i3/bumblebee-status/plugins.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{ pkgs
, python
, ...
}:
# propagatedBuildInputs are for Python libraries and executables
# buildInputs are for libraries
let
py = python.pkgs;
in
{
amixer.propagatedBuildInputs = [ pkgs.alsa-utils ];
# aptitude is unpackaged
# apt.propagatedBuildInputs = [aptitude];
arandr.propagatedBuildInputs = [ py.tkinter pkgs.arandr pkgs.xorg.xrandr ];
# checkupdates is unpackaged
# arch-update.propagatedBuildInputs = [checkupdates];
# checkupdates is unpackaged
# arch_update.propagatedBuildInputs = [checkupdates];
# yay is unpackaged
# aur-update.propagatedBuildInputs = [yay];
battery = { };
battery-upower = { };
battery_upower = { };
bluetooth.propagatedBuildInputs = [ pkgs.bluez pkgs.blueman pkgs.dbus ];
bluetooth2.propagatedBuildInputs = [ pkgs.bluez pkgs.blueman pkgs.dbus py.dbus-python ];
blugon.propagatedBuildInputs = [ pkgs.blugon ];
# If you do not allow this plugin to query the system's ACPI, i.e. the plugin option `use_acpi` is set to `False`, then you need at least one of [ brightnessctl light xbacklight ]
brightness.propagatedBuildInputs = [ ];
caffeine.propagatedBuildInputs = [ pkgs.xdg-utils pkgs.xdotool pkgs.xorg.xprop pkgs.libnotify ];
cmus.propagatedBuildInputs = [ pkgs.cmus ];
cpu.propagatedBuildInputs = [ py.psutil pkgs.gnome.gnome-system-monitor ];
cpu2.propagatedBuildInputs = [ py.psutil pkgs.lm_sensors ];
cpu3.propagatedBuildInputs = [ py.psutil pkgs.lm_sensors ];
currency.propagatedBuildInputs = [ py.requests ];
date = { };
datetime = { };
datetimetz.propagatedBuildInputs = [ py.tzlocal py.pytz ];
datetz = { };
deadbeef.propagatedBuildInputs = [ pkgs.deadbeef ];
debug = { };
deezer.propagatedBuildInputs = [ py.dbus-python ];
disk = { };
# dnf is unpackaged
# dnf.propagatedBuildInputs = [dnf];
docker_ps.propagatedBuildInputs = [ py.docker ];
dunst.propagatedBuildInputs = [ pkgs.dunst ];
dunstctl.propagatedBuildInputs = [ pkgs.dunst ];
# emerge is unpackaged
# emerge_status.propagatedBuildInputs = [emerge];
error = { };
gcalendar.propagatedBuildInputs = [
py.google-api-python-client
py.google-auth-httplib2
py.google-auth-oauthlib
];
getcrypto.propagatedBuildInputs = [ py.requests ];
git.propagatedBuildInputs = [ pkgs.xcwd pkgs.pygit2 ];
github.propagatedBuildInputs = [ py.requests ];
gitlab.propagatedBuildInputs = [ py.requests ];
# gpmdp-remote is unpackaged
# gpmdp.propagatedBuildInputs = [gpmdp-remote];
hddtemp = { };
hostname = { };
http_status = { };
indicator.propagatedBuildInputs = [ pkgs.xorg.xset ];
kernel = { };
keys = { };
# python3Packages.xkbgroup is unpackaged
layout = {
buildInputs = [ pkgs.xorg.libX11 ];
# propagatedBuildInputs = [py.xkbgroup];
};
# python3Packages.xkbgroup is unpackaged
layout-xkb = {
buildInputs = [ pkgs.xorg.libX11 ];
# propagatedBuildInputs = [py.xkbgroup];
};
layout-xkbswitch.propagatedBuildInputs = [ pkgs.xkb-switch ];
# python3Packages.xkbgroup is unpackaged
# NOTE: Yes, there is also a plugin named `layout-xkb` with a dash.
layout_xkb = {
buildInputs = [ pkgs.xorg.libX11 ];
# propagatedBuildInputs = [python3Packages.xkbgroup];
};
# NOTE: Yes, there is also a plugin named `layout-xkbswitch` with a dash.
layout_xkbswitch.propagatedBuildInputs = [ pkgs.xkb-switch ];
libvirtvms.propagatedBuildInputs = [ py.libvirt ];
load.propagatedBuildInputs = [ pkgs.gnome.gnome-system-monitor ];
memory.propagatedBuildInputs = [ pkgs.gnome.gnome-system-monitor ];
messagereceiver = { };
mocp.propagatedBuildInputs = [ pkgs.moc ];
mpd.propagatedBuildInputs = [ pkgs.mpc-cli ];
network.propagatedBuildInputs = [ py.netifaces pkgs.iw ];
network_traffic.propagatedBuildInputs = [ py.netifaces ];
nic.propagatedBuildInputs = [ py.netifaces pkgs.iw ];
notmuch_count.propagatedBuildInputs = [ pkgs.notmuch ];
# nvidian-smi is unpackaged
# nvidiagpu.propagatedBuildInputs = [nvidia-smi];
octoprint.propagatedBuildInputs = [ py.tkinter ];
# optimus-manager is unpackaged
# optman.propagatedBuildInputs = [optimus-manager];
pacman.propagatedBuildInputs = [ pkgs.fakeroot pkgs.pacman ];
pamixer.propagatedBuildInputs = [ pkgs.pamixer ];
persian_date.propagatedBuildInputs = [ py.jdatetime ];
pihole = { };
ping.propagatedBuildInputs = [ pkgs.iputils ];
pipewire.buildInputs = [ pkgs.wireplumber ];
playerctl.propagatedBuildInputs = [ pkgs.playerctl ];
pomodoro = { };
# emerge is unpackaged
# portage_status.propagatedBuildInputs = [emerge];
# prime-select is unpackaged
# prime.propagatedBuildInputs = [prime-select];
progress.propagatedBuildInputs = [ pkgs.progress ];
publicip.propagatedBuildInputs = [ py.netifaces ];
# Deprecated in favor of pulsectl
# pulseaudio = {};
pulsectl.propagatedBuildInputs = [ pkgs.pulsectl ];
redshift.propagatedBuildInputs = [ pkgs.redshift ];
# rofication is unpackaged
# rofication.propagatedBuildInputs = [rofication];
rotation.propagatedBuildInputs = [ pkgs.xorg.xrandr ];
rss = { };
sensors.propagatedBuildInputs = [ pkgs.lm_sensors ];
sensors2.propagatedBuildInputs = [ pkgs.lm_sensors ];
shell = { };
shortcut = { };
smartstatus.propagatedBuildInputs = [ pkgs.smartmontools ];
solaar.propagatedBuildInputs = [ pkgs.solaar ];
spaceapi.propagatedBuildInputs = [ py.requests ];
spacer = { };
speedtest.propagatedBuildInputs = [ py.speedtest-cli ];
spotify.propagatedBuildInputs = [ py.dbus-python ];
stock = { };
# suntime is not packaged yet
# sun.propagatedBuildInputs = [ py.requests python-dateutil suntime ];
system.propagatedBuildInputs = [ py.tkinter ];
taskwarrior.propagatedBuildInputs = [ py.taskw ];
test = { };
thunderbird = { };
time = { };
timetz = { };
title.propagatedBuildInputs = [ py.i3ipc ];
todo = { };
todo_org = { };
todoist.propagatedBuildInputs = [ py.requests ];
traffic = { };
# Needs `systemctl`
twmn.propagatedBuildInputs = [ ];
uptime = { };
usage.propagatedBuildInputs = [ py.sqlite pkgs.activitywatch ];
vault.propagatedBuildInputs = [ pkgs.pass ];
vpn.propagatedBuildInputs = [ py.tkinter pkgs.networkmanager ];
wakatime.propagatedBuildInputs = [ py.requests ];
watson.propagatedBuildInputs = [ pkgs.watson ];
weather.propagatedBuildInputs = [ py.requests ];
xkcd = { };
# i3 is optional
xrandr.propagatedBuildInputs = [ pkgs.xorg.xrandr ];
yubikey.propagatedBuildInputs = [ pkgs.yubico ];
zpool = { };
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31042,6 +31042,10 @@ with pkgs;

boops = callPackage ../applications/audio/boops { };

bumblebee-status = callPackage ../applications/window-managers/i3/bumblebee-status {
python = python3;
};

cgif = callPackage ../tools/graphics/cgif { };

ChowCentaur = callPackage ../applications/audio/ChowCentaur { };
Expand Down