Commit 26aa3f8c authored by redyf's avatar redyf
Browse files

yaak: init at 2025.1.2

Add yaak to nixpkgs, credits to
[SyedAhkam](https://github.com/SyedAhkam).
https://github.com/NixOS/nixpkgs/pull/341253 That PR is still open, but
inactive so I'd like to follow with this one, in case the maintainer
doesn't manifest his intention to keep working on this package.
parent 79c09b73
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
{
  appimageTools,
  fetchurl,
  lib,
}:
appimageTools.wrapType2 rec {
  pname = "yaak";
  version = "2025.1.2";

  src = fetchurl {
    url = "https://github.com/mountain-loop/yaak/releases/download/v${version}/${pname}_${version}_amd64.AppImage";
    hash = "sha256-daUB2BW0y+6TYL6V591Yx/9JtgLdyuKEhCPjfG5L4WQ=";
  };

  contents = appimageTools.extract {
    inherit pname version src;
    postExtract = ''
      substituteInPlace $out/yaak.desktop --replace-fail 'yaak-app' 'yaak'
    '';
  };

  extraInstallCommands = ''
    install -Dm444 ${contents}/yaak.desktop $out/share/applications/yaak.desktop
    for size in "32x32" "128x128" "256x256@2"; do
      install -Dm444 ${contents}/usr/share/icons/hicolor/$size/apps/yaak-app.png $out/share/icons/hicolor/$size/apps/yaak.png
    done
  '';

  meta = {
    description = "Desktop API client for organizing and executing REST, GraphQL, and gRPC requests";
    homepage = "https://yaak.app/";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ redyf ];
    mainProgram = "yaak";
    platforms = [ "x86_64-linux" ];
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
  };
}