zaphyra's git: nixfiles

zaphyra's nixfiles

commit 772e780dc553a26b03810b95e54f1121afd3d46c
parent 5b8ad7ffca93247212c8be0a33a210cf3660043e
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 19 Jun 2026 12:56:23 +0200

packages: add `meshy`
3 files changed, 114 insertions(+), 0 deletions(-)
M
nixosModules/zpha/profiles/graphical.nix
|
1
+
A
nixosModules/zpha/programs/meshy.nix
|
22
++++++++++++++++++++++
A
packages/meshy/package.nix
|
91
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/nixosModules/zpha/profiles/graphical.nix b/nixosModules/zpha/profiles/graphical.nix
@@ -117,6 +117,7 @@
         thunderbird.enable = true;
         gajim.enable = true;
         dino.enable = true;
+        meshy.enable = true;
         gnome-calendar.enable = true;
       };
     };
diff --git a/nixosModules/zpha/programs/meshy.nix b/nixosModules/zpha/programs/meshy.nix
@@ -0,0 +1,22 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+
+{
+
+  options.zpha.programs.meshy.enable = lib.mkEnableOption "meshy";
+
+  config = lib.mkIf config.zpha.programs.meshy.enable {
+    preservation.preserveAt."/persist".users.zaphyra.directories = [
+      ".local/share/meshy"
+    ];
+
+    users.users.zaphyra.maid = {
+      packages = [ pkgs.zpha.meshy ];
+    };
+  };
+
+}
diff --git a/packages/meshy/package.nix b/packages/meshy/package.nix
@@ -0,0 +1,91 @@
+{
+  lib,
+  stdenv,
+  fetchFromCodeberg,
+  meson,
+  ninja,
+  pkg-config,
+  wrapGAppsHook4,
+  gobject-introspection,
+  blueprint-compiler,
+  desktop-file-utils,
+  appstream,
+  glib,
+  gettext,
+  gtk4,
+  libadwaita,
+  gst_all_1,
+  libshumate,
+  geoclue2,
+  python3,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "meshy";
+  version = "26.06";
+
+  src = fetchFromCodeberg {
+    owner = "sesivany";
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
+    hash = "sha256-6uoy9zyyhzpuyPeYXmnNWrCZ/Djm2J3isA5iEAch9Cs=";
+  };
+
+  pythonEnv = python3.withPackages (
+    ps: with ps; [
+      pygobject3
+      pycryptodome
+      pyzbar
+      pyserial
+      segno
+    ]
+  );
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook4
+    gobject-introspection
+    blueprint-compiler
+    desktop-file-utils
+    appstream
+    glib
+    gettext
+  ];
+
+  buildInputs = [
+    gtk4
+    libadwaita
+    gst_all_1.gstreamer
+    libshumate
+    geoclue2
+    finalAttrs.pythonEnv
+  ];
+
+  mesonFlags = [ "--buildtype=release" ];
+
+  dontWrapGApps = false;
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix PYTHONPATH : "${finalAttrs.pythonEnv}/${finalAttrs.pythonEnv.sitePackages}"
+      --prefix PYTHONPATH : "$out/${finalAttrs.pythonEnv.sitePackages}"
+    )
+  '';
+
+  meta = with lib; {
+    description = "GTK4/libadwaita client for MeshCore";
+    longDescription = ''
+      Meshy is a native Linux desktop application providing a
+      GTK4/libadwaita UI for MeshCore companion radio nodes. It
+      supports connecting to nodes via serial, BLE, and TCP.
+    '';
+    homepage = "https://codeberg.org/sesivany/meshy";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ zaphyra ];
+    platforms = platforms.linux;
+    mainProgram = "meshy";
+  };
+
+})