{
  stdenv,
  lib,
  python3,
  fetchFromGitHub,
  meson,
  appstream-glib,
  pkg-config,
  glib,
  libadwaita,
  wrapGAppsHook4,
  desktop-file-utils,
  ninja,
  gobject-introspection,
  gtk4,
}:

stdenv.mkDerivation (_finaAttrs: rec {
  pname = "aviator";
  version = "0.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "gianni-rosato";
    repo = "aviator";
    rev = version;
    hash = "sha256-5PjQgCapI9WU4kR0k0uYWnFERYEZxCuTnTbD1oN+Zms=";
  };

  nativeBuildInputs = [
    appstream-glib
    meson
    wrapGAppsHook4
    pkg-config
    desktop-file-utils
    ninja
    python3.pkgs.pygobject3
    gobject-introspection
  ];

  buildInputs = [
    gtk4
    glib
    libadwaita
    (python3.withPackages (
      ps: with ps; [
        pygobject3
        ffmpeg-progress-yield
        ffmpeg-python
      ]
    ))
  ];

  meta = {
    description = "A lightweight, Flatpak-first, easy-to-use GUI utility for encoding with SVT-AV1 & Opus";
    homepage = "https://github.com/gianni-rosato/aviator";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ CaptainJawZ ];
    mainProgram = "aviator";
  };
})
