sxmo-utils: separate the DWM and Sway dependencies; only ship those we need

also, remove mepo
This commit is contained in:
2023-09-24 19:49:59 +00:00
parent 74309f8fa4
commit 4f49c86d73

View File

@@ -10,6 +10,7 @@
, coreutils , coreutils
, curl , curl
, dbus , dbus
, dmenu
, fetchgit , fetchgit
, fetchpatch , fetchpatch
, gitUpdater , gitUpdater
@@ -25,7 +26,6 @@
, lisgd , lisgd
, makeBinaryWrapper , makeBinaryWrapper
, mako , mako
, mepo
, modemmanager , modemmanager
, nettools , nettools
, playerctl , playerctl
@@ -33,6 +33,7 @@
, pulseaudio , pulseaudio
, rsync , rsync
, scdoc , scdoc
, scrot
, sfeed , sfeed
, slurp , slurp
, superd , superd
@@ -50,22 +51,21 @@
, rev ? version , rev ? version
, hash ? "" , hash ? ""
, patches ? [] , patches ? []
, supportSway ? true
, supportDwm ? false
}: }:
let let
# anything which any sxmo script or default hook in this package might invoke # anything which any sxmo script or default hook in this package might invoke
runtimeDeps = [ runtimeDeps = [
bc # also in busybox bc # also in busybox
bemenu
bonsai bonsai
brightnessctl brightnessctl
conky conky
curl curl
dbus dbus
# dmenu # or dmenu-wayland? only used on x11?
gnugrep # also in busybox gnugrep # also in busybox
gojq gojq
grim
inotify-tools inotify-tools
j4-dmenu-desktop j4-dmenu-desktop
jq jq
@@ -73,25 +73,28 @@ let
libxml2.bin # for xmllint; sxmo_weather.sh, sxmo_surf_linkset.sh libxml2.bin # for xmllint; sxmo_weather.sh, sxmo_surf_linkset.sh
lisgd lisgd
mako mako
mepo # mepo_ui_central_menu.sh
modemmanager # mmcli modemmanager # mmcli
nettools # netstat nettools # netstat
playerctl playerctl
procps # pgrep procps # pgrep
pulseaudio # pactl pulseaudio # pactl
sfeed sfeed
slurp # for sxmo_screenshot.sh
superd superd
wob
xdg-user-dirs # used by sxmo_hook_start.sh
xrdb # for sxmo_xinit AND sxmo_winit
] ++ lib.optionals supportSway [
bemenu
grim
slurp # for sxmo_screenshot.sh
sway sway
swayidle swayidle
wl-clipboard # for wl-copy; sxmo_screenshot.sh wl-clipboard # for wl-copy; sxmo_screenshot.sh
wob
wtype # for sxmo_type wtype # for sxmo_type
wvkbd wvkbd # sxmo_winit.sh
xdg-user-dirs # used by sxmo_hook_start.sh ] ++ lib.optionals supportDwm [
xrdb # for sxmo_xinit AND sxmo_winit dmenu
scrot # sxmo_screenshot.sh
# X11 only?
xdotool xdotool
]; ];
in in
@@ -157,7 +160,7 @@ stdenv.mkDerivation rec {
; do ; do
case $(basename $f) in case $(basename $f) in
(sxmo_common.sh|sxmo_deviceprofile_*.sh|sxmo_hook_icons.sh|sxmo_init.sh) (sxmo_common.sh|sxmo_deviceprofile_*.sh|sxmo_hook_icons.sh|sxmo_init.sh)
# these are sourced by other scripts: don't wrap them else the `exec` in the wrapper breaks the outer script # these are sourced by other scripts: don't wrap them else the `exec` in the nix wrapper breaks the outer script
;; ;;
(*) (*)
wrapProgram "$f" \ wrapProgram "$f" \
@@ -168,7 +171,7 @@ stdenv.mkDerivation rec {
''; '';
passthru = { passthru = {
providedSessions = [ "sxmo" "swmo" ]; providedSessions = (lib.optional supportSway "swmo") ++ (lib.optional supportDwm "sxmo");
updateScript = gitUpdater { }; updateScript = gitUpdater { };
}; };