diff mbox series

[bug#58208,6/7] gnu: Add vamp-aubio-plugins.

Message ID 7545dbcf059f8a60f3b1a48411a3e30a893f0edc.1664583143.git.lilah@lunabee.space
State New
Headers show
Series Add Sonic Visualiser and VAMP plugins. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Lilah Tascheter Oct. 1, 2022, 12:22 a.m. UTC
* gnu/packages/audio.scm (vamp-aubio-plugins): New variable.
---
 gnu/packages/audio.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Comments

\( Oct. 27, 2022, 7:05 p.m. UTC | #1
On Sat Oct 1, 2022 at 1:22 AM BST, Lilah Tascheter via Guix-patches via wrote:
> +              (uri (string-append "https://aubio.org/pub/vamp-aubio-plugins/"
> +                                  "vamp-aubio-plugins-" version ".tar.bz2"))

Add a file-name field.

> +              (sha256
> +                (base32
> +                  "1gpcg7hih42qmys8a9zylgas3xfrzqijasgaphm43bmiw7vrvxis"))

One space indents here.

> +              (snippet '(begin ;; remove outdated & bundled waf
> +                          (delete-file "waf")
> +                          (delete-file-recursively "waflib")))))

Use gexp instead of quote here,

  (snippet
   #~(begin
       (delete-file "waf")
       (delete-file-recursively "waflib")))

> +    (arguments
> +      `(#:tests? #f ;; no tests available
> +        #:phases
> +        (modify-phases %standard-phases
> +          (add-before 'configure 'setup-waf
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (let ((waf (assoc-ref inputs "python-waf")))
> +                (copy-file (string-append waf "/bin/waf") "waf")))))))

Use the modern argument style (and correct comment style),

  (arguments
   (list #:tests? #f ;no tests
         #:phases
         #~(modify-phases %standard-phases
             (add-before 'configure 'setup-waf
               (lambda* (#:key inputs #:allow-other-keys)
                 (copy-file (search-input-file inputs "bin/waf")
                            "waf"))))))

> +    (native-search-paths
> +      (list (search-path-specification
> +              (variable "VAMP_PATH")
> +              (files '("lib/vamp")))))

Use the ``$VAMP_PATH'' variable here.

> +    (description "A set of VAMP plugins wrapping the audio annotation features
> +of Aubio for use in a VAMP host. Includes plugins for note tracking, energy

guix lint says "sentences in description should be followed by two
spaces"; remember to run it for every package you write :) Also, full
sentences.

> +    (home-page "https://aubio.org/vamp-aubio-plugins/")

Move home-page, etc etc :)

    -- (
\( Oct. 27, 2022, 7:12 p.m. UTC | #2
On Sat Oct 1, 2022 at 1:22 AM BST, Lilah Tascheter via Guix-patches via wrote:
> +    (native-search-paths
> +      (list (search-path-specification
> +              (variable "VAMP_PATH")
> +              (files '("lib/vamp")))))

Actually, on second thought, is this necessary for VAMP *plugins*,
not just VAMP itsalf?

    -- (
diff mbox series

Patch

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 0d9261c35a..198e3cb7e8 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -5904,6 +5904,44 @@  (define-public streamripper
 be separated.")
     (license license:gpl2+)))
 
+(define-public vamp-aubio-plugins
+  (package
+    (name "vamp-aubio-plugins")
+    (version "0.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://aubio.org/pub/vamp-aubio-plugins/"
+                                  "vamp-aubio-plugins-" version ".tar.bz2"))
+              (sha256
+                (base32
+                  "1gpcg7hih42qmys8a9zylgas3xfrzqijasgaphm43bmiw7vrvxis"))
+              (modules '((guix build utils)))
+              (snippet '(begin ;; remove outdated & bundled waf
+                          (delete-file "waf")
+                          (delete-file-recursively "waflib")))))
+    (build-system waf-build-system)
+    (arguments
+      `(#:tests? #f ;; no tests available
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'configure 'setup-waf
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((waf (assoc-ref inputs "python-waf")))
+                (copy-file (string-append waf "/bin/waf") "waf")))))))
+    (inputs (list aubio vamp))
+    (native-inputs (list pkg-config python-waf))
+    (native-search-paths
+      (list (search-path-specification
+              (variable "VAMP_PATH")
+              (files '("lib/vamp")))))
+    (synopsis "VAMP plugin for audio labelling")
+    (description "A set of VAMP plugins wrapping the audio annotation features
+of Aubio for use in a VAMP host. Includes plugins for note tracking, energy
+extracting, pitch detection, silence detection, spectral description, and beat
+tracking.")
+    (home-page "https://aubio.org/vamp-aubio-plugins/")
+    (license license:gpl3+)))
+
 (define-public sonic-visualiser
   (package
     (name "sonic-visualiser")