mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
bfabe2a17a
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib
|
|
, fetchurl
|
|
, appimageTools
|
|
}:
|
|
|
|
let
|
|
pname = "zulip";
|
|
version = "5.5.0";
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/zulip/zulip-desktop/releases/download/v${version}/Zulip-${version}-x86_64.AppImage";
|
|
sha256 = "059zfcvaq8wnsz2lfd4gdb17b6nngqk3vgisy2kb29ifqf3lpzqi";
|
|
name="${pname}-${version}.AppImage";
|
|
};
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
inherit name src;
|
|
};
|
|
|
|
in appimageTools.wrapType2 {
|
|
inherit name src;
|
|
|
|
extraInstallCommands = ''
|
|
mv $out/bin/${name} $out/bin/${pname}
|
|
install -m 444 -D ${appimageContents}/zulip.desktop $out/share/applications/zulip.desktop
|
|
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/zulip.png \
|
|
$out/share/icons/hicolor/512x512/apps/zulip.png
|
|
substituteInPlace $out/share/applications/zulip.desktop \
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Desktop client for Zulip Chat";
|
|
homepage = "https://zulip.com";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ jonafato ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|