sxmo-utils: use busybox

This commit is contained in:
Colin 2023-08-07 03:10:02 +00:00
parent 8dc568d52e
commit b993479ada
2 changed files with 13 additions and 32 deletions

View File

@ -1,24 +0,0 @@
diff --git a/setup_config_version.sh b/setup_config_version.sh
index fde40c1..6386014 100755
--- a/setup_config_version.sh
+++ b/setup_config_version.sh
@@ -8,7 +8,7 @@ case "$1" in
exit
esac
-case "$(busybox head -n1 "$1")" in
+case "$(head -n1 "$1")" in
"#"*)
comment="#"
;;
@@ -23,7 +23,7 @@ case "$(busybox head -n1 "$1")" in
;;
esac
-busybox md5sum "$1" | \
- busybox cut -d" " -f1 | \
- busybox xargs -I{} busybox sed -i "2i$comment configversion: {}" \
+md5sum "$1" | \
+ cut -d" " -f1 | \
+ xargs -I{} sed -i "2i$comment configversion: {}" \
"$1"

View File

@ -2,6 +2,8 @@
, bc , bc
, bemenu , bemenu
, bonsai , bonsai
, buildPackages
, busybox
, conky , conky
, coreutils , coreutils
, dbus , dbus
@ -40,13 +42,14 @@
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 # bc # busybox
bemenu bemenu
bonsai bonsai
busybox # sxmo targets busybox, which differs from non-busybox utilities in subtle ways (e.g. `pidof` behavior)
conky conky
dbus dbus
# dmenu # or dmenu-wayland? only used on x11? # dmenu # or dmenu-wayland? only used on x11?
gnugrep # gnugrep # busybox
gojq gojq
grim grim
inotify-tools inotify-tools
@ -106,7 +109,6 @@ stdenv.mkDerivation rec {
url = "https://lists.sr.ht/~mil/sxmo-devel/patches/42880/mbox"; url = "https://lists.sr.ht/~mil/sxmo-devel/patches/42880/mbox";
hash = "sha256-tAMPBb6vwzj1dFMTEaqrcCJU6FbQirwZgB0+tqW3rQA="; hash = "sha256-tAMPBb6vwzj1dFMTEaqrcCJU6FbQirwZgB0+tqW3rQA=";
}) })
./0004-no-busybox.patch
# wanted to fix/silence some non-fatal errors # wanted to fix/silence some non-fatal errors
./0005-system-audio.patch ./0005-system-audio.patch
./0007-workspace-wrapping.patch ./0007-workspace-wrapping.patch
@ -160,11 +162,14 @@ stdenv.mkDerivation rec {
scdoc scdoc
]; ];
installFlags = [ installPhase = ''
"OPENRC=0" runHook preInstall
"DESTDIR=$(out)"
"PREFIX=" # busybox is used by setup_config_version.sh, but placing it in nativeBuildInputs breaks the nix builder
]; PATH="$PATH:${buildPackages.busybox}/bin" make OPENRC=0 DESTDIR=$out PREFIX= install
runHook postInstall
'';
# we don't wrap sxmo_common.sh or sxmo_init.sh # we don't wrap sxmo_common.sh or sxmo_init.sh
# which is unfortunate, for non-sxmo-utils files that might source though. # which is unfortunate, for non-sxmo-utils files that might source though.