diff options
Diffstat (limited to 'pkgs/by-name/ht/httpie-desktop/package.nix')
-rw-r--r-- | pkgs/by-name/ht/httpie-desktop/package.nix | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/pkgs/by-name/ht/httpie-desktop/package.nix b/pkgs/by-name/ht/httpie-desktop/package.nix index bc318c071135..42e2395299c9 100644 --- a/pkgs/by-name/ht/httpie-desktop/package.nix +++ b/pkgs/by-name/ht/httpie-desktop/package.nix @@ -2,15 +2,37 @@ appimageTools, lib, fetchurl, + stdenv, }: + appimageTools.wrapType2 rec { pname = "httpie-desktop"; version = "2024.1.2"; - src = fetchurl { - url = "https://github.com/httpie/desktop/releases/download/v${version}/HTTPie-${version}.AppImage"; - hash = "sha256-OOP1l7J2BgO3nOPSipxfwfN/lOUsl80UzYMBosyBHrM="; - }; + src = + if stdenv.hostPlatform.system == "aarch64-linux" then + fetchurl { + url = "https://github.com/httpie/desktop/releases/download/v${version}/HTTPie-${version}-arm64.AppImage"; + hash = "sha256-RhIyLakCkMUcXvu0sgl5MtV4YXXkqqH1UUS7bptUzww="; + } + else + fetchurl { + url = "https://github.com/httpie/desktop/releases/download/v${version}/HTTPie-${version}.AppImage"; + hash = "sha256-OOP1l7J2BgO3nOPSipxfwfN/lOUsl80UzYMBosyBHrM="; + }; + + extraInstallCommands = + let + contents = appimageTools.extractType2 { inherit pname version src; }; + in + '' + mkdir -p $out/share + cp -r ${contents}/usr/share/* $out/share + chmod +w $out/share + install -Dm644 ${contents}/httpie.desktop $out/share/applications/httpie.desktop + substituteInPlace $out/share/applications/httpie.desktop \ + --replace-fail 'Exec=AppRun' 'Exec=httpie-desktop' + ''; meta = with lib; { description = "Cross-platform API testing client for humans. Painlessly test REST, GraphQL, and HTTP APIs"; @@ -18,6 +40,9 @@ appimageTools.wrapType2 rec { license = licenses.unfree; maintainers = with maintainers; [ luftmensch-luftmensch ]; mainProgram = "httpie-desktop"; - platforms = [ "x86_64-linux" ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; }; } |