571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{ lib
|
|
, fetchurl
|
|
, appimageTools
|
|
}:
|
|
|
|
let
|
|
pname = "zulip";
|
|
version = "5.11.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/zulip/zulip-desktop/releases/download/v${version}/Zulip-${version}-x86_64.AppImage";
|
|
hash = "sha256-t5qBm5+kTdeRMvcHpNbS5mp184UG/IqgJrtj7Ntcbb0=";
|
|
name="${pname}-${version}.AppImage";
|
|
};
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
inherit pname version src;
|
|
};
|
|
|
|
in appimageTools.wrapType2 {
|
|
inherit pname version src;
|
|
|
|
runScript = "appimage-exec.sh -w ${appimageContents} -- \${NIXOS_OZONE_WL:+\${WAYLAND_DISPLAY:+--ozone-platform-hint=auto}}";
|
|
|
|
extraInstallCommands = ''
|
|
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-fail 'Exec=AppRun' 'Exec=${pname}'
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Desktop client for Zulip Chat";
|
|
homepage = "https://zulip.com";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ andersk ];
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "zulip";
|
|
};
|
|
}
|