buffybox: 3.2.0 -> 3.2.0-unstable-2024-10-05
with my patches, this gets much better CPU use project has bee refactored so that it builds both unl0kr *and* buffyboard
This commit is contained in:
@@ -15,7 +15,7 @@ in
|
|||||||
{
|
{
|
||||||
options.sane.services.buffyboard = with lib; {
|
options.sane.services.buffyboard = with lib; {
|
||||||
enable = mkEnableOption "buffyboard framebuffer keyboard";
|
enable = mkEnableOption "buffyboard framebuffer keyboard";
|
||||||
package = mkPackageOption pkgs "buffyboard" {};
|
package = mkPackageOption pkgs "buffybox" {};
|
||||||
extraFlags = mkOption {
|
extraFlags = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
@@ -82,7 +82,7 @@ in
|
|||||||
before = [ "getty.target" ];
|
before = [ "getty.target" ];
|
||||||
|
|
||||||
serviceConfig.Type = "simple";
|
serviceConfig.Type = "simple";
|
||||||
serviceConfig.ExecStart = "${lib.getExe cfg.package} ${lib.escapeShellArgs cfg.extraFlags}";
|
serviceConfig.ExecStart = "${lib.getExe' cfg.package "buffyboard"} ${lib.escapeShellArgs cfg.extraFlags}";
|
||||||
serviceConfig.Restart = "on-failure";
|
serviceConfig.Restart = "on-failure";
|
||||||
serviceConfig.RestartSec = "2s";
|
serviceConfig.RestartSec = "2s";
|
||||||
# TODO: sandboxing
|
# TODO: sandboxing
|
||||||
|
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
fetchFromGitLab,
|
|
||||||
inih,
|
|
||||||
lib,
|
|
||||||
libinput,
|
|
||||||
meson,
|
|
||||||
ninja,
|
|
||||||
pkg-config,
|
|
||||||
stdenv,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "buffyboard";
|
|
||||||
version = "3.2.0";
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
|
||||||
domain = "gitlab.com";
|
|
||||||
owner = "postmarketOS";
|
|
||||||
repo = "buffybox";
|
|
||||||
rev = finalAttrs.version;
|
|
||||||
fetchSubmodules = true; # to use its vendored lvgl
|
|
||||||
hash = "sha256-nZX7mSY9IBIhVNmOD6mXI1IF2TgyKLc00a8ADAvVLB0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
sourceRoot = "source/buffyboard";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
meson
|
|
||||||
ninja
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
inih
|
|
||||||
libinput
|
|
||||||
];
|
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "touch-enabled on-screen keyboard running on the Linux framebuffer";
|
|
||||||
mainProgram = "buffyboard";
|
|
||||||
homepage = "https://gitlab.com/postmarketOS/buffybox";
|
|
||||||
license = licenses.gpl3Plus;
|
|
||||||
maintainers = with lib.maintainers; [ colinsane ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
})
|
|
70
pkgs/by-name/buffybox/package.nix
Normal file
70
pkgs/by-name/buffybox/package.nix
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
fetchFromGitLab,
|
||||||
|
fetchFromGitea,
|
||||||
|
inih,
|
||||||
|
lib,
|
||||||
|
libdrm,
|
||||||
|
libinput,
|
||||||
|
libxkbcommon,
|
||||||
|
meson,
|
||||||
|
ninja,
|
||||||
|
pkg-config,
|
||||||
|
scdoc,
|
||||||
|
stdenv,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "buffybox";
|
||||||
|
version = "3.2.0-unstable-2024-10-05";
|
||||||
|
|
||||||
|
# TODO: upstream my changes:
|
||||||
|
# - cross compilation fix
|
||||||
|
# - sleep instead of poll (CPU reduction)
|
||||||
|
# - however, this doesn't reduce CPU *enough*. it's still 10% at idle on lappy.
|
||||||
|
|
||||||
|
# src = fetchFromGitLab {
|
||||||
|
# domain = "gitlab.com";
|
||||||
|
# owner = "postmarketOS";
|
||||||
|
# repo = "buffybox";
|
||||||
|
# rev = finalAttrs.version;
|
||||||
|
# fetchSubmodules = true; # to use its vendored lvgl
|
||||||
|
# hash = "sha256-nZX7mSY9IBIhVNmOD6mXI1IF2TgyKLc00a8ADAvVLB0=";
|
||||||
|
# };
|
||||||
|
|
||||||
|
src = fetchFromGitea {
|
||||||
|
domain = "git.uninsane.org";
|
||||||
|
owner = "colin";
|
||||||
|
repo = "buffybox";
|
||||||
|
rev = "671626a565755bdaa2d2abfef17fe263d56bfdc7";
|
||||||
|
fetchSubmodules = true; # to use its vendored lvgl
|
||||||
|
hash = "sha256-jv2cwnR3BVGOERmG39LXhf9ikgOhbil+y/nNqt/zPHw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
depsBuildBuild = [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
scdoc
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
inih
|
||||||
|
libdrm
|
||||||
|
libinput
|
||||||
|
libxkbcommon
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "a suite of graphical applications for the terminal";
|
||||||
|
homepage = "https://gitlab.com/postmarketOS/buffybox";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with lib.maintainers; [ colinsane ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
Reference in New Issue
Block a user