zulip: Use pname and version

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2023-01-07 12:05:47 -08:00
parent 960e7415c1
commit bc1d989403

View file

@ -6,7 +6,6 @@
let
pname = "zulip";
version = "5.9.4";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/zulip/zulip-desktop/releases/download/v${version}/Zulip-${version}-x86_64.AppImage";
@ -15,14 +14,14 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
mv "$out/bin/${pname}-${version}" "$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