diff --git a/pkgs/development/tools/altair-graphql-client/default.nix b/pkgs/development/tools/altair-graphql-client/default.nix new file mode 100644 index 000000000000..46ef678b5ba2 --- /dev/null +++ b/pkgs/development/tools/altair-graphql-client/default.nix @@ -0,0 +1,38 @@ +{ lib, appimageTools, fetchurl, gsettings-desktop-schemas, gtk3 }: + +let + pname = "altair"; + version = "4.0.2"; + name = "${pname}-v${version}"; + + src = fetchurl { + url = "https://github.com/imolorhe/altair/releases/download/v${version}/altair_${version}_x86_64_linux.AppImage"; + sha256 = "sha256-HCoK+ljcTmyBZSCDe6u2x2urqrQfi3DIlXfCqGWvl3E="; + }; + + appimageContents = appimageTools.extract { inherit name src; }; +in +appimageTools.wrapType2 { + inherit src name; + + profile = '' + export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS + ''; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/${pname} + + 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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9fe3a786b2d..d8e77bcf6d4d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12344,6 +12344,8 @@ in alloy5 alloy; + altair = callPackage ../development/tools/altair-graphql-client { }; + ameba = callPackage ../development/tools/ameba { }; augeas = callPackage ../tools/system/augeas { };