Unverified Commit 2e07fed5 authored by Ben LeMasurier's avatar Ben LeMasurier
Browse files

polybar-pulseaudio-control: init at 3.1.1

parent 539939a3
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
{ 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 ];
  };
})