zaphyra's git: nixfiles

zaphyra's nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
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";
  };

})