(fix): nixos missing .desktop files, binary name from desktop app
This commit is contained in:
parent
0d711ea55c
commit
919814ae0b
3 changed files with 31 additions and 18 deletions
37
flake.nix
37
flake.nix
|
|
@ -12,24 +12,29 @@
|
|||
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";
|
||||
in {
|
||||
default = pkgs.appimageTools.wrapType2 {
|
||||
pname = "tensamin";
|
||||
inherit version;
|
||||
src = pkgs.fetchurl {
|
||||
url = "${forgejoBaseUrl}/${artifact}";
|
||||
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
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 = pkgs.appimageTools.wrapType2 {
|
||||
pname = "tensamin";
|
||||
inherit version;
|
||||
|
||||
src = appImagePath;
|
||||
};
|
||||
localPathForDev = wrapAppImage appImagePath;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue