(define-module (ryan-packages audio)
               #:use-module ((guix licenses) #:prefix license:)
               #:use-module (guix gexp)
               #:use-module (guix build-system meson)
               #:use-module (guix packages)
               #:use-module (guix download)
               #:use-module (guix utils)
               #:use-module (gnu packages)
               #:use-module (gnu packages glib)
               #:use-module (gnu packages audio)
               #:use-module (gnu packages pulseaudio)
               #:use-module (gnu packages gtk)
               #:use-module (gnu packages xiph)
               #:use-module (gnu packages tbb)
               #:use-module (gnu packages gettext)
               #:use-module (gnu packages gnome)
               #:use-module (gnu packages pretty-print)
               #:use-module (gnu packages algebra)
               #:use-module (gnu packages cpp)
               #:use-module (gnu packages linux)
               #:use-module (gnu packages freedesktop)
               #:use-module (gnu packages cmake)
               #:use-module (gnu packages maths)
               #:use-module (gnu packages pkg-config))

(define-public easyeffects
  (package
    (name "easyeffects")
    (version "7.0.1")
    (arguments
      (list
        #:modules
        '((guix build utils)
          (guix build meson-build-system))
        #:imported-modules
        (append %meson-build-system-modules)
        #:tests? #f))
    (native-inputs (list gettext-minimal
                         itstool
                         desktop-file-utils
                         `(,glib "bin")
                         `(,gtk+ "bin")
                         pkg-config
                         cmake
                         appstream-glib))
    (inputs (list zita-convolver
                  rnnoise
                  tbb
                  fftwf
                  lilv
                  fmt
                  rubberband
                  speexdsp
                  nlohmann-json
                  pipewire
                  libadwaita
                  libsigc++
                  libbs2b
                  libsndfile
                  libsamplerate
                  libebur128
                  libportal
                  gsl
                  speex
              `(,util-linux "lib")))
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/wwmm/easyeffects/archive/refs/tags/v" version
                                 ".tar.gz"))
              (sha256
                (base32
                  "05j52fy51zjai7n0j23chydfgkfq9n82h2ih806z3b47zhk2h2j2"))))
    (build-system meson-build-system)
    (synopsis "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications")
    (description "This package provides @code{easyeffects}, which is an audio application for use atop of @code{pipewire}
                 that allows effects that modify sound sources and sinks. This cannot be updated to the latest version (7.0.8) because
                 the packaged version of @code{gtk} is too old.")
    (home-page "https://github.com/wwmm/easyeffects")
    (license license:gpl3+)))

easyeffects
