2023-05-16 07:08:04 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchgit
|
|
|
|
, gitUpdater
|
|
|
|
, lib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sxmo-utils";
|
2023-05-16 11:09:57 +00:00
|
|
|
version = "1.14.1";
|
2023-05-16 07:08:04 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~mil/sxmo-utils";
|
|
|
|
rev = version;
|
2023-05-16 11:09:57 +00:00
|
|
|
hash = "sha256-UcJid1fi3Mgu32dCqlI9RQYnu5d07MMwW3eEYuYVBw4=";
|
2023-05-16 07:08:04 +00:00
|
|
|
};
|
|
|
|
|
2023-05-16 11:09:57 +00:00
|
|
|
patches = [
|
2023-05-24 09:00:36 +00:00
|
|
|
# needed for basic use:
|
2023-05-16 11:09:57 +00:00
|
|
|
./0001-group-differs-from-user.patch
|
|
|
|
./0002-ensure-log-dir.patch
|
2023-05-17 00:24:46 +00:00
|
|
|
./0003-fix-xkb-paths.patch
|
2023-05-24 09:00:36 +00:00
|
|
|
|
|
|
|
# personal preferences:
|
|
|
|
./0004-full-auto-rotate.patch
|
2023-05-16 11:09:57 +00:00
|
|
|
];
|
|
|
|
|
2023-05-16 07:08:04 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's@/usr/lib/udev/rules\.d@/etc/udev/rules.d@' Makefile
|
2023-05-16 11:09:57 +00:00
|
|
|
sed -i "s@/etc/profile\.d/sxmo_init.sh@$out/etc/profile.d/sxmo_init.sh@" scripts/core/*.sh
|
2023-05-17 00:24:46 +00:00
|
|
|
sed -i "s@/usr/bin/@@g" scripts/core/sxmo_version.sh
|
2023-05-17 06:50:07 +00:00
|
|
|
sed -i 's:ExecStart=/usr/bin/:ExecStart=/usr/bin/env :' configs/superd/services/*.service
|
2023-05-19 08:03:24 +00:00
|
|
|
|
|
|
|
# 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
|
2023-05-16 07:08:04 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"OPENRC=0"
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"PREFIX="
|
|
|
|
];
|
|
|
|
|
2023-05-16 11:09:57 +00:00
|
|
|
passthru = {
|
|
|
|
providedSessions = [ "sxmo" "swmo" ];
|
|
|
|
updateScript = gitUpdater { };
|
|
|
|
};
|
2023-05-16 07:08:04 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://git.sr.ht/~mil/sxmo-utils";
|
|
|
|
description = "Contains the scripts and small C programs that glues the sxmo enviroment together";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ colinsane ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|