{ lib, fetchFromGitHub, stdenv, pkg-config, gtk4, gtk4-layer-shell, json-glib, ... }: stdenv.mkDerivation (finalAttrs: { pname = "echo-meter"; version = "0.0.0-unstable-2025-08-26"; rev = "e6e5a70600e85edcfca3aa44153a26614b6fe55c"; srcHash = "sha256-QPQ3crm7i0L0PivlhIsPLrv1TNVwF/c+WQDRK4EtEV8="; src = fetchFromGitHub { owner = "Nithin-3"; repo = finalAttrs.pname; hash = finalAttrs.srcHash; inherit (finalAttrs) rev; }; postPatch = '' substituteInPlace src/echo-meter.c \ --replace-fail "gtk-layer-shell/gtk-layer-shell.h" "gtk4-layer-shell/gtk4-layer-shell.h" ''; nativeBuildInputs = [ pkg-config ]; buildInputs = [ gtk4 gtk4-layer-shell json-glib ]; installPhase = '' mkdir -p $out/bin cp ./echo-meter $out/bin cp -r ./assets $out/share ''; meta = { description = "A lightweight GTK4 layer-shell application that displays always-on-top real-time audio, brightness, and microphone level indicators."; homepage = "https://github.com/Nithin-3/echo-meter"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ zaphyra ]; platforms = lib.platforms.linux; mainProgram = "echo-meter"; }; })