From 2e07fed5a92f927893779af4ad4d263fd5d78be2 Mon Sep 17 00:00:00 2001 From: Ben LeMasurier Date: Wed, 6 Dec 2023 13:20:52 -0700 Subject: [PATCH] polybar-pulseaudio-control: init at 3.1.1 --- .../po/polybar-pulseaudio-control/package.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/po/polybar-pulseaudio-control/package.nix diff --git a/pkgs/by-name/po/polybar-pulseaudio-control/package.nix b/pkgs/by-name/po/polybar-pulseaudio-control/package.nix new file mode 100644 index 000000000000..a4063dd34f8c --- /dev/null +++ b/pkgs/by-name/po/polybar-pulseaudio-control/package.nix @@ -0,0 +1,44 @@ +{ lib +, bash +, coreutils +, fetchFromGitHub +, gawk +, makeWrapper +, pulseaudio +, stdenv +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "polybar-pulseaudio-control"; + version = "3.1.1"; + + src = fetchFromGitHub { + owner = "marioortizmanero"; + repo = "polybar-pulseaudio-control"; + rev = "v${finalAttrs.version}"; + hash = "sha256-egCBCnhnmHHKFeDkpaF9Upv/oZ0K3XGyutnp4slq9Vc="; + }; + + dontConfigure = true; + dontBuild = true; + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + + install -Dm755 pulseaudio-control.bash $out/bin/pulseaudio-control + wrapProgram "$out/bin/pulseaudio-control" \ + --prefix PATH : "${lib.makeBinPath [ bash coreutils gawk pulseaudio ]}" + + runHook postInstall + ''; + + meta = with lib; { + mainProgram = "pulseaudio-control"; + description = "Polybar module to control PulseAudio devices, also known as Pavolume"; + homepage = "https://github.com/marioortizmanero/polybar-pulseaudio-control"; + platforms = platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ benlemasurier ]; + }; +})