From 63eaf931b1f457e682f568506a26d5b4ea8b7afe Mon Sep 17 00:00:00 2001 From: Stefan Haan Date: Sat, 13 Jun 2026 22:51:53 +0200 Subject: [PATCH] fluux-messenger: init at 0.16.0 --- pkgs/by-name/fl/fluux-messenger/package.nix | 78 +++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 pkgs/by-name/fl/fluux-messenger/package.nix diff --git a/pkgs/by-name/fl/fluux-messenger/package.nix b/pkgs/by-name/fl/fluux-messenger/package.nix new file mode 100644 index 000000000000..6f588a2378ef --- /dev/null +++ b/pkgs/by-name/fl/fluux-messenger/package.nix @@ -0,0 +1,78 @@ +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + cargo-tauri, + nodejs, + npmHooks, + fetchNpmDeps, + pkg-config, + webkitgtk_4_1, + libayatana-appindicator, + libxscrnsaver, + cacert, + wrapGAppsHook3, + autoPatchelfHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "fluux-messenger"; + version = "0.16.0"; + __structuredAttrs = true; + strictDeps = true; + + src = fetchFromGitHub { + owner = "processone"; + repo = "fluux-messenger"; + rev = "v${finalAttrs.version}"; + hash = "sha256-P4bRyge5EGdlZBdX+gIWh48itkCLQ+EjKLHt4xv6qnY="; + }; + + cargoRoot = "apps/fluux/src-tauri"; + cargoHash = "sha256-YIX/F9LMuHFGJ89NIsFLUjjrR7XBoJF78OsyXiSjEqU="; + + npmDeps = fetchNpmDeps { + name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps"; + inherit (finalAttrs) src; + hash = "sha256-rzkFrvLb/0c+pg2SIUnhyTHK2MGL2ugRI9XuHtdm8XE="; + }; + + nativeBuildInputs = [ + cargo-tauri.hook + nodejs + npmHooks.npmConfigHook + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + (wrapGAppsHook3.override { isGraphical = true; }) + autoPatchelfHook + ]; + + buildInputs = [ + webkitgtk_4_1 + libayatana-appindicator + libxscrnsaver + cacert + ]; + + # libayatana-appindicator is not in the RUNPATH by default + runtimeDependencies = [ libayatana-appindicator ]; + + tauriBuildFlags = [ "--no-sign" ]; + + # setting buildAndTestSubdir from the beginning interferes with buildPhase + preCheck = "export buildAndTestSubdir=${finalAttrs.cargoRoot}"; + # tauriInstallHook only works when we are in cargoRoot + preInstall = "pushd $buildAndTestSubdir"; + postInstall = "popd"; + + meta = { + description = "XMPP client for communities and organizations"; + homepage = "https://github.com/processone/fluux-messenger"; + license = lib.licenses.agpl3Plus; + mainProgram = "fluux"; + maintainers = [ lib.maintainers.haansn08 ]; + platforms = lib.platforms.all; + }; +})