2023-10-09 19:29:22 +00:00
|
|
|
{ lib, appimageTools, makeWrapper, fetchurl }:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "altair";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.2.13";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/imolorhe/altair/releases/download/v${version}/altair_${version}_x86_64_linux.AppImage";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-IKlJy7rH/O4DySYV046hjDu1VWPZNA0Ti/ndVVmYNdk=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
2021-05-20 23:08:51 +00:00
|
|
|
in
|
|
|
|
appimageTools.wrapType2 {
|
2022-04-27 09:35:20 +00:00
|
|
|
inherit src pname version;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
extraInstallCommands = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
mv $out/bin/${pname}-${version} $out/bin/${pname}
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
source "${makeWrapper}/nix-support/setup-hook"
|
|
|
|
wrapProgram $out/bin/${pname} \
|
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A feature-rich GraphQL Client IDE";
|
|
|
|
homepage = "https://github.com/imolorhe/altair";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ evalexpr ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|