From 5f9fa170d06b4498ab35595e868f3fda82e90540 Mon Sep 17 00:00:00 2001 From: hustlerone Date: Fri, 13 Jun 2025 12:18:01 +0200 Subject: [PATCH] pkgs/buffybox: split into unl0kr and buffyboard --- .../modules/services/hardware/buffyboard.nix | 2 +- nixos/modules/system/boot/unl0kr.nix | 4 +- .../bu/{buffybox => buffyboard}/package.nix | 24 ++----- pkgs/by-name/un/unl0kr/package.nix | 64 +++++++++++++++++++ pkgs/top-level/aliases.nix | 2 +- 5 files changed, 75 insertions(+), 21 deletions(-) rename pkgs/by-name/bu/{buffybox => buffyboard}/package.nix (58%) create mode 100644 pkgs/by-name/un/unl0kr/package.nix diff --git a/nixos/modules/services/hardware/buffyboard.nix b/nixos/modules/services/hardware/buffyboard.nix index f6cab16138c02..d3ad345476695 100644 --- a/nixos/modules/services/hardware/buffyboard.nix +++ b/nixos/modules/services/hardware/buffyboard.nix @@ -30,7 +30,7 @@ in options = { services.buffyboard = with lib; { enable = mkEnableOption "buffyboard framebuffer keyboard (on-screen keyboard)"; - package = mkPackageOption pkgs "buffybox" { }; + package = mkPackageOption pkgs "buffyboard" { }; extraFlags = mkOption { type = types.listOf types.str; diff --git a/nixos/modules/system/boot/unl0kr.nix b/nixos/modules/system/boot/unl0kr.nix index 7b7197cb0c108..63b9da3537f6f 100644 --- a/nixos/modules/system/boot/unl0kr.nix +++ b/nixos/modules/system/boot/unl0kr.nix @@ -15,7 +15,7 @@ in description = ''Whether to enable the unl0kr on-screen keyboard in initrd to unlock LUKS.''; }; - package = lib.mkPackageOption pkgs "buffybox" { }; + package = lib.mkPackageOption pkgs "unl0kr" { }; allowVendorDrivers = lib.mkEnableOption "load optional drivers" // { description = ''Whether to load additional drivers for certain vendors (I.E: Wacom, Intel, etc.)''; @@ -93,7 +93,7 @@ in ]; packages = [ - pkgs.buffybox + cfg.package ]; paths.unl0kr-agent.wantedBy = [ "local-fs-pre.target" ]; diff --git a/pkgs/by-name/bu/buffybox/package.nix b/pkgs/by-name/bu/buffyboard/package.nix similarity index 58% rename from pkgs/by-name/bu/buffybox/package.nix rename to pkgs/by-name/bu/buffyboard/package.nix index 9e07c35918570..5df86b0f16028 100644 --- a/pkgs/by-name/bu/buffybox/package.nix +++ b/pkgs/by-name/bu/buffyboard/package.nix @@ -15,31 +15,18 @@ }: stdenv.mkDerivation (finalAttrs: { - pname = "buffybox"; - version = "3.3.0"; + pname = "buffyboard"; + version = "3.3.0-unstable-2025-06-12"; src = fetchFromGitLab { domain = "gitlab.postmarketos.org"; owner = "postmarketOS"; repo = "buffybox"; fetchSubmodules = true; # to use its vendored lvgl - rev = "dce41a6f07a2b63c3136409b7bcd0078299fadf9"; - hash = "sha256-n5RQg7kGS+lg7sRe5Defl3nDEha0vhc/FbwywD5wBsg="; + rev = "dd30685f75f396ba9798e765c798342a5ea47370"; + hash = "sha256-l9bIcn5UkpAI6Z6W4rjj20lEAhJn+5GPaiGOVEtENhA="; }; - patches = [ - (fetchpatch2 { - # This fixes a bug that might annoy you if you use something like PKCS#11 - url = "https://gitlab.postmarketos.org/postmarketOS/buffybox/-/commit/d8214b522a3cc72cd4639a1dd114103a02e9218c.patch"; - hash = "sha256-WxKuioJ1Fo5ARRYF/R4yULDVB4pq11phljzVGdWTV6s="; - }) - (fetchpatch2 { - # Fixes up UB - url = "https://gitlab.postmarketos.org/postmarketOS/buffybox/-/commit/4e13c312241420cbb3e5cc7d4f0dd3e5d17449be.patch"; - hash = "sha256-7yX6gGsptwijx+ZedSJWJKhwaoBVpxIbGK+ZiMLsIhc="; - }) - ]; - depsBuildBuild = [ pkg-config ]; @@ -58,6 +45,8 @@ stdenv.mkDerivation (finalAttrs: { libxkbcommon ]; + mesonInstallTags = [ "buffyboard" ]; + env.PKG_CONFIG_SYSTEMD_SYSTEMD_SYSTEM_UNIT_DIR = "${placeholder "out"}/lib/systemd/system"; strictDeps = true; @@ -69,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://gitlab.postmarketos.org/postmarketOS/buffybox"; license = licenses.gpl3Plus; maintainers = with lib.maintainers; [ colinsane ]; + mainProgram = "buffyboard"; platforms = platforms.linux; }; }) diff --git a/pkgs/by-name/un/unl0kr/package.nix b/pkgs/by-name/un/unl0kr/package.nix new file mode 100644 index 0000000000000..04a2d896c5d8a --- /dev/null +++ b/pkgs/by-name/un/unl0kr/package.nix @@ -0,0 +1,64 @@ +{ + fetchFromGitLab, + fetchpatch2, + inih, + lib, + libdrm, + libinput, + libxkbcommon, + meson, + ninja, + pkg-config, + scdoc, + stdenv, + gitUpdater, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "unl0kr"; + version = "3.3.0-unstable-2025-06-12"; + + src = fetchFromGitLab { + domain = "gitlab.postmarketos.org"; + owner = "postmarketOS"; + repo = "buffybox"; + fetchSubmodules = true; # to use its vendored lvgl + rev = "dd30685f75f396ba9798e765c798342a5ea47370"; + hash = "sha256-l9bIcn5UkpAI6Z6W4rjj20lEAhJn+5GPaiGOVEtENhA="; + }; + + depsBuildBuild = [ + pkg-config + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + scdoc + ]; + + buildInputs = [ + inih + libdrm + libinput + libxkbcommon + ]; + + mesonInstallTags = [ "unl0kr" ]; + + env.PKG_CONFIG_SYSTEMD_SYSTEMD_SYSTEM_UNIT_DIR = "${placeholder "out"}/lib/systemd/system"; + + strictDeps = true; + + passthru.updateScript = gitUpdater { }; + + meta = with lib; { + description = "Suite of graphical applications for the terminal"; + homepage = "https://gitlab.postmarketos.org/postmarketOS/buffybox"; + license = licenses.gpl3Plus; + maintainers = with lib.maintainers; [ hustlerone ]; + mainProgram = "unl0kr"; + platforms = platforms.linux; + }; +}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3f0235e09a09e..1021b70e9225a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1985,7 +1985,7 @@ mapAliases { unifi8 = throw "'unifi8' has been removed. Use `pkgs.unifi` instead."; # Converted to throw 2025-05-10 unifiLTS = throw "'unifiLTS' has been removed since UniFi no longer has LTS and stable releases. Use `pkgs.unifi` instead."; # Added 2024-04-11 unifiStable = throw "'unifiStable' has been removed since UniFi no longer has LTS and stable releases. Use `pkgs.unifi` instead."; # Converted to throw 2024-04-11 - unl0kr = throw "'unl0kr' is now included with buffybox. Use `pkgs.buffybox` instead."; # Removed 2024-12-20 + buffybox = throw "'buffybox' has been split into `pkgs.buffyboard` and `pkgs.unl0kr`."; # Split 2025-06-13 untrunc = throw "'untrunc' has been renamed to/replaced by 'untrunc-anthwlock'"; # Converted to throw 2024-10-17 unzoo = throw "'unzoo' has been removed since it is unmaintained upstream and doesn't compile with newer versions of GCC anymore"; # Removed 2025-05-24 uq = throw "'uq' has been removed due to lack of upstream maintenance"; # Added 2025-01-25