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.
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ lib, appimageTools, makeWrapper, fetchurl }:
|
|
|
|
let
|
|
pname = "altair";
|
|
version = "8.0.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/imolorhe/altair/releases/download/v${version}/altair_${version}_x86_64_linux.AppImage";
|
|
sha256 = "sha256-q3AkqhE0hD6+cCv5UeZ4uyUi6Adrmxv4jMGYN7Keias=";
|
|
};
|
|
|
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
|
in
|
|
appimageTools.wrapType2 {
|
|
inherit src pname version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
extraInstallCommands = ''
|
|
wrapProgram $out/bin/${pname} \
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
|
|
|
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 = "Feature-rich GraphQL Client IDE";
|
|
mainProgram = "altair";
|
|
homepage = "https://github.com/imolorhe/altair";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ evalexpr ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|