diff --git a/pkgs/additional/sxmo-utils/0004-no-busybox.patch b/pkgs/additional/sxmo-utils/0004-no-busybox.patch new file mode 100644 index 00000000..2d0634fb --- /dev/null +++ b/pkgs/additional/sxmo-utils/0004-no-busybox.patch @@ -0,0 +1,24 @@ +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" diff --git a/pkgs/additional/sxmo-utils/0004-full-auto-rotate.patch b/pkgs/additional/sxmo-utils/0104-full-auto-rotate.patch similarity index 100% rename from pkgs/additional/sxmo-utils/0004-full-auto-rotate.patch rename to pkgs/additional/sxmo-utils/0104-full-auto-rotate.patch diff --git a/pkgs/additional/sxmo-utils/en_us_105.xkb b/pkgs/additional/sxmo-utils/customization/configs/xkb/xkb_mobile_normal_buttons similarity index 100% rename from pkgs/additional/sxmo-utils/en_us_105.xkb rename to pkgs/additional/sxmo-utils/customization/configs/xkb/xkb_mobile_normal_buttons diff --git a/pkgs/additional/sxmo-utils/default.nix b/pkgs/additional/sxmo-utils/default.nix index c28f6c7b..80ce9a40 100644 --- a/pkgs/additional/sxmo-utils/default.nix +++ b/pkgs/additional/sxmo-utils/default.nix @@ -2,6 +2,7 @@ , fetchgit , gitUpdater , lib +, rsync }: stdenv.mkDerivation rec { @@ -19,9 +20,10 @@ stdenv.mkDerivation rec { ./0001-group-differs-from-user.patch ./0002-ensure-log-dir.patch ./0003-fix-xkb-paths.patch + ./0004-no-busybox.patch # personal preferences: - ./0004-full-auto-rotate.patch + ./0104-full-auto-rotate.patch ]; postPatch = '' @@ -30,8 +32,11 @@ stdenv.mkDerivation rec { sed -i "s@/usr/bin/@@g" scripts/core/sxmo_version.sh sed -i 's:ExecStart=/usr/bin/:ExecStart=/usr/bin/env :' configs/superd/services/*.service - # on devices where volume is part of the primary keyboard, we want to avoid overwriting the default map - cp ${./en_us_105.xkb} configs/xkb/xkb_mobile_normal_buttons + # apply customizations + # - xkb_mobile_normal_buttons: + # - on devices where volume is part of the primary keyboard (e.g. thinkpad), we want to avoid overwriting the default map + # - this provided map is the en_US 105 key map + ${rsync}/bin/rsync -rlv ${./customization}/ ./ ''; installFlags = [