diff --git a/nixos/modules/services/x11/desktop-managers/phosh.nix b/nixos/modules/services/x11/desktop-managers/phosh.nix index 299aeaea6c14..3013cc8a79e0 100644 --- a/nixos/modules/services/x11/desktop-managers/phosh.nix +++ b/nixos/modules/services/x11/desktop-managers/phosh.nix @@ -7,25 +7,6 @@ let cfg = config.services.xserver.desktopManager.phosh; - # Based on https://source.puri.sm/Librem5/librem5-base/-/blob/4596c1056dd75ac7f043aede07887990fd46f572/default/sm.puri.OSK0.desktop - oskItem = pkgs.makeDesktopItem { - name = "sm.puri.OSK0"; - desktopName = "On-screen keyboard"; - exec = "${pkgs.squeekboard}/bin/squeekboard"; - categories = [ - "GNOME" - "Core" - ]; - onlyShowIn = [ "GNOME" ]; - noDisplay = true; - extraConfig = { - X-GNOME-Autostart-Phase = "Panel"; - X-GNOME-Provides = "inputmethod"; - X-GNOME-Autostart-Notify = "true"; - X-GNOME-AutoRestart = "true"; - }; - }; - phocConfigType = lib.types.submodule { options = { xwayland = lib.mkOption { @@ -245,8 +226,7 @@ in environment.systemPackages = [ pkgs.phoc cfg.package - pkgs.squeekboard - oskItem + pkgs.stevia ]; systemd.packages = [ cfg.package ]; diff --git a/pkgs/by-name/st/stevia/package.nix b/pkgs/by-name/st/stevia/package.nix new file mode 100644 index 000000000000..1cd8ace2671c --- /dev/null +++ b/pkgs/by-name/st/stevia/package.nix @@ -0,0 +1,86 @@ +{ + lib, + stdenv, + fetchFromGitLab, + meson, + ninja, + pkg-config, + python3, + wayland-scanner, + wrapGAppsHook3, + appstream, + cmake, + feedbackd, + fzf, + glib, + gmobile, + gnome-desktop, + gtk3, + hunspell, + json-glib, + libhandy, + libxkbcommon, + systemd, + nix-update-script, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "stevia"; + version = "0.51.0"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "World/Phosh"; + repo = "stevia"; + tag = "v${finalAttrs.version}"; + hash = "sha256-dRygDUHXpXjEuwNNfgVy742jfIhT9erN7IcmaMImuYw="; + }; + + mesonFlags = [ + "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" + "-Dsystemd_user_unit_dir=${placeholder "out"}/lib/systemd/user" + ]; + + postPatch = '' + patchShebangs --build tools/write-layout-info.py + ''; + + nativeBuildInputs = [ + meson + cmake + ninja + pkg-config + python3 + wayland-scanner + wrapGAppsHook3 + ]; + + buildInputs = [ + appstream + feedbackd + fzf + glib.dev + gmobile + gnome-desktop + gtk3 + hunspell + json-glib + libhandy + libxkbcommon + systemd + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "User friendly on screen keyboard for Phosh"; + homepage = "https://gitlab.gnome.org/World/Phosh/stevia"; + changelog = "https://gitlab.gnome.org/World/Phosh/stevia/-/releases/v${finalAttrs.version}"; + license = with lib.licenses; [ gpl3Plus ]; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ + ungeskriptet + armelclo + ]; + mainProgram = "phosh-osk-stevia"; + }; +})