mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 21:43:32 +00:00
bc3d4bb295
Renamed session-desktop-appimage to session-desktop
66 lines
1.6 KiB
Nix
66 lines
1.6 KiB
Nix
{ lib
|
|
, makeDesktopItem
|
|
, copyDesktopItems
|
|
, stdenvNoCC
|
|
, fetchurl
|
|
, appimageTools
|
|
, makeWrapper
|
|
}:
|
|
|
|
let
|
|
version = "1.9.1";
|
|
pname = "session-desktop";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/oxen-io/session-desktop/releases/download/v${version}/session-desktop-linux-x86_64-${version}.AppImage";
|
|
sha256 = "sha256-Zc3btkvN4ic47IGigeFJGx4dwbM+b7iuIOxpmcWmrRQ=";
|
|
};
|
|
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 makeWrapper ];
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "Session";
|
|
desktopName = "Session";
|
|
comment = "Onion routing based messenger";
|
|
exec = "${appimage}/bin/session-desktop-${version}";
|
|
icon = "${appimage-contents}/session-desktop.png";
|
|
terminal = false;
|
|
type = "Application";
|
|
categories = [ "Network" ];
|
|
})
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mv bin/session-desktop-${version} bin/session-desktop
|
|
|
|
mkdir -p $out/
|
|
cp -r bin $out/bin
|
|
|
|
wrapProgram $out/bin/session-desktop \
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Onion routing based messenger";
|
|
homepage = "https://getsession.org/";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ alexnortung ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|