mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / by-name / ht / httpie-desktop / package.nix
blob42e2395299c9f7bf5c73a8d5288474cd85c15a49
2   appimageTools,
3   lib,
4   fetchurl,
5   stdenv,
6 }:
8 appimageTools.wrapType2 rec {
9   pname = "httpie-desktop";
10   version = "2024.1.2";
12   src =
13     if stdenv.hostPlatform.system == "aarch64-linux" then
14       fetchurl {
15         url = "https://github.com/httpie/desktop/releases/download/v${version}/HTTPie-${version}-arm64.AppImage";
16         hash = "sha256-RhIyLakCkMUcXvu0sgl5MtV4YXXkqqH1UUS7bptUzww=";
17       }
18     else
19       fetchurl {
20         url = "https://github.com/httpie/desktop/releases/download/v${version}/HTTPie-${version}.AppImage";
21         hash = "sha256-OOP1l7J2BgO3nOPSipxfwfN/lOUsl80UzYMBosyBHrM=";
22       };
24   extraInstallCommands =
25     let
26       contents = appimageTools.extractType2 { inherit pname version src; };
27     in
28     ''
29       mkdir -p $out/share
30       cp -r ${contents}/usr/share/* $out/share
31       chmod +w $out/share
32       install -Dm644 ${contents}/httpie.desktop $out/share/applications/httpie.desktop
33       substituteInPlace $out/share/applications/httpie.desktop \
34         --replace-fail 'Exec=AppRun' 'Exec=httpie-desktop'
35     '';
37   meta = with lib; {
38     description = "Cross-platform API testing client for humans. Painlessly test REST, GraphQL, and HTTP APIs";
39     homepage = "https://github.com/httpie/desktop";
40     license = licenses.unfree;
41     maintainers = with maintainers; [ luftmensch-luftmensch ];
42     mainProgram = "httpie-desktop";
43     platforms = [
44       "x86_64-linux"
45       "aarch64-linux"
46     ];
47   };