revolt-desktop: init at 1.0.6

This commit is contained in:
heyimnova 2023-02-20 19:10:32 +00:00 committed by Anderson Torres
parent a187151e27
commit d6481fa812
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,61 @@
{ stdenv
, lib
, fetchurl
, appimageTools
, makeWrapper
, electron
}:
stdenv.mkDerivation rec {
pname = "revolt-desktop";
version = "1.0.6";
src = fetchurl {
url = "https://github.com/revoltchat/desktop/releases/download/v${version}/Revolt-linux.AppImage";
sha256 = "sha256-Wsm6ef2Reenq3/aKGaP2yzlOuLKaxKtRHCLLMxvWUUY=";
};
appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/{applications,revolt-desktop}
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/revolt-desktop.desktop $out/share/applications/${pname}.desktop
cp -a ${appimageContents}/usr/share/icons $out/share/icons
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
runHook postInstall
'';
postFixup = ''
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app.asar
'';
meta = with lib; {
description = "An open source user-first chat platform";
homepage = "https://revolt.chat/";
changelog = "https://github.com/revoltchat/desktop/releases/tag/v${version}";
license = licenses.agpl3Only;
maintainers = with maintainers; [ heyimnova ];
platforms = platforms.linux;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "revolt-desktop";
};
}

View file

@ -11404,6 +11404,8 @@ with pkgs;
inherit (qt5) qttools;
};
revolt-desktop = callPackage ../applications/networking/instant-messengers/revolt-desktop { };
rbw = callPackage ../tools/security/rbw {
inherit (darwin.apple_sdk.frameworks) Security;
};