{
  lib,
  stdenv,
  fetchFromGitHub,
  cargo,
  meson,
  ninja,
  pkg-config,
  rustPlatform,
  rustc,
  wrapGAppsHook4,
  cairo,
  gdk-pixbuf,
  glib,
  gtk4,
  libadwaita,
  pango,
  desktop-file-utils,
  appstream,
  git,
}:

stdenv.mkDerivation rec {
  pname = "resources";
  version = "1.7.1";

  src = fetchFromGitHub {
    owner = "nokyan";
    repo = "resources";
    rev = "v${version}";
    hash = "sha256-SHawaH09+mDovFiznZ+ZkUgUbv5tQGcXBgUGrdetOcA=";
  };

  cargoDeps = rustPlatform.fetchCargoTarball {
    inherit src;
    name = "${pname}-${version}";
    hash = "sha256-tUD+gx9nQiGWKKRPcR7OHbPvU2j1dQjYck7FF9vYqSQ=";
  };

  nativeBuildInputs = [
    cargo
    meson
    ninja
    pkg-config
    rustPlatform.cargoSetupHook
    rustc
    wrapGAppsHook4
    desktop-file-utils
    appstream
    git
  ];

  buildInputs = [
    cairo
    gdk-pixbuf
    glib
    gtk4
    libadwaita
    pango
  ];

  meta = {
    description = "Keep an eye on system resources";
    homepage = "https://github.com/nokyan/resources";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ CaptainJawZ ];
    mainProgram = "resources";
    platforms = lib.platforms.all;
  };
}
