client/flake.nix
Alois 919814ae0b
All checks were successful
/ build-web (push) Successful in 3m17s
/ build-desktop (linux) (push) Successful in 8m41s
/ build-mobile (push) Successful in 25m43s
/ release (push) Successful in 57s
(fix): nixos missing .desktop files, binary name from desktop app
2026-05-27 18:58:05 +02:00

40 lines
1.4 KiB
Nix

{
description = "Tensamin desktop client";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = {nixpkgs, ...}: let
systems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs systems;
version = "0.0.3";
forgejoBaseUrl = "https://git.methanium.net/tensamin/client/releases/download/${version}";
in {
packages = forAllSystems (system: let
pkgs = import nixpkgs {inherit system;};
artifact = if system == "aarch64-linux" then "Tensamin-${version}-linux-arm64.AppImage" else "Tensamin-${version}-linux-x86_64.AppImage";
appImagePath = /. + builtins.getEnv "TENSAMIN_APPIMAGE";
desktopItem = pkgs.makeDesktopItem {
name = "tensamin";
desktopName = "Tensamin";
exec = "tensamin %U";
icon = "tensamin";
categories = ["Network"];
};
wrapAppImage = src:
pkgs.appimageTools.wrapType2 {
pname = "tensamin";
inherit version src;
extraInstallCommands = ''
install -Dm444 ${desktopItem}/share/applications/tensamin.desktop $out/share/applications/tensamin.desktop
'';
};
in {
default = wrapAppImage (pkgs.fetchurl {
url = "${forgejoBaseUrl}/${artifact}";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
});
localPathForDev = wrapAppImage appImagePath;
});
};
}