session-desktop-appimage: refactor
Added desktop entry and icon.
This commit is contained in:
parent
1d5c9053d1
commit
fc5e712dcc
@ -1,15 +1,53 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, makeDesktopItem
|
||||||
|
, copyDesktopItems
|
||||||
|
, stdenvNoCC
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, appimageTools
|
, appimageTools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
appimageTools.wrapType2 rec {
|
let
|
||||||
pname = "session-desktop-appimage";
|
|
||||||
version = "1.7.9";
|
version = "1.7.9";
|
||||||
|
pname = "session-desktop-appimage";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/oxen-io/session-desktop/releases/download/v${version}/session-desktop-linux-x86_64-${version}.AppImage";
|
url = "https://github.com/oxen-io/session-desktop/releases/download/v${version}/session-desktop-linux-x86_64-${version}.AppImage";
|
||||||
sha256 = "ca7754e59146633b71e66b02a90cff87e4f2574e57ff831ca4a5f983b7e2fbef";
|
sha256 = "ca7754e59146633b71e66b02a90cff87e4f2574e57ff831ca4a5f983b7e2fbef";
|
||||||
};
|
};
|
||||||
|
appimage = appimageTools.wrapType2 {
|
||||||
|
inherit version pname src;
|
||||||
|
};
|
||||||
|
appimage-contents = appimageTools.extractType2 {
|
||||||
|
inherit version pname src;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
inherit version pname;
|
||||||
|
src = appimage;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ copyDesktopItems ];
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = "Session";
|
||||||
|
desktopName = "Session";
|
||||||
|
comment = "Onion routing based messenger";
|
||||||
|
exec = "${appimage}/bin/session-desktop-appimage-${version}";
|
||||||
|
icon = "${appimage-contents}/session-desktop.png";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
categories = [ "Network" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/
|
||||||
|
cp -r bin $out/bin
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Onion routing based messenger";
|
description = "Onion routing based messenger";
|
||||||
|
Loading…
Reference in New Issue
Block a user