Subject: [PATCH v2 6/9] gnu: Add sonic-visualiser.

From: Lilah Tascheter <[email-masked]>
Date: Fri, 2 Jun 2023 00:56:43 -0500

* gnu/packages/audio.scm (sonic-visualiser): New variable.
---
 gnu/packages/audio.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 58e48973a1..1ff8c77eb9 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -1092,6 +1092,62 @@ (define %configure (assoc-ref %standard-phases 'configure))
 tools.")
     (license license:gpl2+)))
 
+(define-public sonic-visualiser
+  (package
+    (name "sonic-visualiser")
+    (version "4.5.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                     "https://github.com/sonic-visualiser/sonic-visualiser"
+                     "/releases/download/sv_v" version "/sonic-visualiser-"
+                     version ".tar.gz"))
+              (modules '((guix build utils)))
+              (snippet #~(begin
+                           (delete-file-recursively "vamp-plugin-sdk")
+                           (mkdir "vamp-plugin-sdk")))
+              (sha256
+               (base32
+                "11xl5lhj50yhy49qmzwhf3s1rbfcdcc589ffbr4sz5rzksxf25h8"))))
+    (build-system meson-build-system)
+    (arguments
+      (list #:phases
+            #~(modify-phases %standard-phases
+                (add-before 'check 'set-home
+                  (lambda _ ; tests write to $HOME
+                    (setenv "HOME" "/tmp"))))))
+    (inputs
+      (list alsa-lib
+            bzip2
+            capnproto
+            fftw
+            jack-1
+            libfishsound
+            libid3tag
+            liblo
+            libmad
+            libsamplerate
+            libsndfile
+            lrdf
+            oggz
+            opusfile
+            portaudio
+            pulseaudio
+            qtbase-5
+            qtsvg-5
+            rubberband-next
+            serd
+            sord
+            vamp   ; due to how search paths are implemented, plugin use
+            zlib)) ; requires vamp to be added to a profile.
+    (native-inputs (list pkg-config))
+    (home-page "https://sonicvisualiser.org")
+    (synopsis "Program for visualising and inspecting audio files")
+    (description "Sonic Visualiser is a program for annotating, visualising, and
+inspecting audio files, providing waveform analysis and a VAMP host for external
+audio analysis and annotation plugins.")
+    (license license:gpl2+)))
+
 (define-public audiofile
   (package
     (name "audiofile")
-- 
2.40.1