From 11a2d3925b9ad3d6a49b5ba35ffc9b38c8f9c5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Thu, 26 Dec 2019 06:38:57 +0100 Subject: [PATCH] qpaeq: init at 13.0 --- pkgs/servers/pulseaudio/qpaeq.nix | 54 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 56 insertions(+) create mode 100644 pkgs/servers/pulseaudio/qpaeq.nix diff --git a/pkgs/servers/pulseaudio/qpaeq.nix b/pkgs/servers/pulseaudio/qpaeq.nix new file mode 100644 index 000000000000..c84cc29f6528 --- /dev/null +++ b/pkgs/servers/pulseaudio/qpaeq.nix @@ -0,0 +1,54 @@ +{ mkDerivation +, makeDesktopItem +, python3 +, fetchurl +, lib +, pulseaudio +}: + +let + desktopItem = makeDesktopItem { + name = "qpaeq"; + exec = "@out@/bin/qpaeq"; + icon = "audio-volume-high"; + desktopName = "qpaeq"; + genericName = "Audio equalizer"; + categories = "Music;Sound;"; + startupNotify = "false"; + }; +in +mkDerivation rec { + pname = "qpaeq"; + inherit (pulseaudio) version src; + + buildInputs = [ + ((python3.withPackages (ps: with ps; [ + pyqt5 + dbus-python + ]))) + ]; + + dontBuild = true; + dontConfigure = true; + + installPhase = '' + runHook preInstall + install -D ./src/utils/qpaeq $out/bin/qpaeq + install -D ${desktopItem}/share/applications/qpaeq.desktop $out/share/applications/qpaeq.desktop + runHook postInstall + ''; + + preFixup = '' + sed "s|,sip|,PyQt5.sip|g" -i $out/bin/qpaeq + wrapQtApp $out/bin/qpaeq + sed "s|@out@|$out|g" -i $out/share/applications/qpaeq.desktop + ''; + + meta = { + description = "An equalizer interface for pulseaudio's equalizer sinks"; + homepage = http://www.pulseaudio.org/; + license = lib.licenses.lgpl2Plus; + maintainers = with lib.maintainers; [ lovek323 mkg20001 ]; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 460f4a3d3acc..f8c7c0f086ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15409,6 +15409,8 @@ in inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa; }; + qpaeq = qt5.callPackage ../servers/pulseaudio/qpaeq.nix { }; + pulseaudioFull = pulseaudio.override { x11Support = true; jackaudioSupport = true;