nix-files/pkgs/additional/sxmo-utils/default.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv
, fetchgit
, gitUpdater
, lib
, rsync
}:
stdenv.mkDerivation rec {
pname = "sxmo-utils";
2023-05-16 11:09:57 +00:00
version = "1.14.1";
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 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
./0003-fix-xkb-paths.patch
./0004-no-busybox.patch
2023-05-24 09:00:36 +00:00
# personal preferences:
./0104-full-auto-rotate.patch
2023-05-16 11:09:57 +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
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
# 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 = [
"OPENRC=0"
"DESTDIR=$(out)"
"PREFIX="
];
2023-05-16 11:09:57 +00:00
passthru = {
providedSessions = [ "sxmo" "swmo" ];
updateScript = gitUpdater { };
};
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;
};
}