From: Parnikkapore via Guix-patches via <guix-patches@gnu.org>
To: 70487@debbugs.gnu.org
Subject: [bug#70487] [PATCH core-updates 4/4] gnu: lsp-plugins: Test with lv2lint and lv2_validate.
Date: Sun, 21 Apr 2024 01:02:50 +0200 [thread overview]
Message-ID: <7ad4b3dc6f1788dc11b325d8c201023ee33dcaaa.1713647481.git.poomklao@yahoo.com> (raw)
In-Reply-To: <cover.1713647481.git.poomklao@yahoo.com>
* gnu/packages/music.scm (lsp-plugins): Add more tests.
[arguments]: Add (guix build json) to the environment.
[phases]: Run lv2_validate and lv2lint.
[native-inputs]: Add lv2 (for lv2_validate) and lv2lint.
Change-Id: Ie73c5943298611dd0f8b42455151306d86a29a1e
---
gnu/packages/music.scm | 79 ++++++++++++++++++++++++++++--------------
1 file changed, 53 insertions(+), 26 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 4a3e615c15..a234cbe3c2 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -90,6 +90,7 @@ (define-module (gnu packages music)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
+ #:use-module (guix modules)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages)
@@ -6213,31 +6214,57 @@ (define-public lsp-plugins
#:make-flags
#~(list (string-append "CC=" #$(cc-for-target)))
#:phases
- #~(modify-phases %standard-phases
- (replace 'configure
- (lambda _
- (invoke "make" "config"
- "STRICT=1"
- "TEST=1"
- "FEATURES=clap doc jack ladspa lv2 vst2 xdg"
- (string-append "PREFIX=" #$output)
- (string-append "ETCDIR=" #$output "/etc"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke ".build/host/lsp-plugin-fw/lsp-plugins-test" "utest"))))
- (add-after 'install 'move-large-subdirs
- (lambda _
- (define (move-to-output output path)
- (let ((source (string-append #$output path))
- (target (string-append output path)))
- (mkdir-p (dirname target))
- (rename-file source target)))
- (move-to-output #$output:doc "/share/doc") ; 29MB
- (move-to-output #$output:lv2 "/lib/lv2") ; 32MB
- (move-to-output #$output:bin "/bin") ; Avoid cluttering xdg menu
- (move-to-output #$output:bin "/share")
- (move-to-output #$output:bin "/etc"))))))
+ (with-imported-modules (source-module-closure '((guix build json)))
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "make" "config"
+ "STRICT=1"
+ "TEST=1"
+ "FEATURES=clap doc jack ladspa lv2 vst2 xdg"
+ (string-append "PREFIX=" #$output)
+ (string-append "ETCDIR=" #$output "/etc"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke ".build/host/lsp-plugin-fw/lsp-plugins-test" "utest"))))
+ (add-after 'install 'move-large-subdirs
+ (lambda _
+ (define (move-to-output output path)
+ (let ((source (string-append #$output path))
+ (target (string-append output path)))
+ (mkdir-p (dirname target))
+ (rename-file source target)))
+ (move-to-output #$output:doc "/share/doc") ; 29MB
+ (move-to-output #$output:lv2 "/lib/lv2") ; 32MB
+ (move-to-output #$output:bin "/bin") ; Avoid cluttering xdg menu
+ (move-to-output #$output:bin "/share")
+ (move-to-output #$output:bin "/etc")))
+ (add-after 'move-large-subdirs 'postinstall-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (use-modules (guix build json))
+ (let* ((plugins-json
+ (call-with-input-file
+ ".build/target/lsp-plugin-fw/plugins.json"
+ read-json))
+ (plugin-objects
+ (assoc-ref plugins-json "plugins"))
+ (plugin-urls
+ (map (lambda (obj) (assoc-ref obj "lv2_uri"))
+ plugin-objects))
+ (plugin-urls (filter ->bool plugin-urls)))
+ (setenv
+ "LV2_PATH"
+ (string-append #$output:lv2 "/lib/lv2:" #$lv2 "/lib/lv2"))
+ (for-each
+ (lambda (url)
+ (invoke "lv2lint" "-Mpack" "-t" "* Symbols" url))
+ plugin-urls))
+ (system
+ (string-append "lv2_validate "
+ #$output:lv2
+ "/usr/lib/lv2/lsp-*.lv2/*.ttl")))))))))
(inputs
(list cairo
freetype
@@ -6246,7 +6273,7 @@ (define-public lsp-plugins
libx11
libxrandr
mesa))
- (native-inputs (list pkg-config php))
+ (native-inputs (list pkg-config php lv2 lv2lint))
(outputs '("out" "doc" "lv2" "debug"))
(synopsis "Audio plugin collection")
(description "LSP (Linux Studio Plugins) is a collection of audio
--
2.41.0
prev parent reply other threads:[~2024-04-20 23:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1713647481.git.poomklao.ref@yahoo.com>
2024-04-20 22:03 ` [bug#70487] [PATCH core-updates 0/4] Add more tests to lsp-plugins Parnikkapore via Guix-patches via
2024-04-20 23:02 ` [bug#70487] [PATCH core-updates 1/4] gnu: lv2lint: Update to 0.16.2 Parnikkapore via Guix-patches via
2024-04-20 23:02 ` [bug#70487] [PATCH core-updates 2/4] gnu: sord: Fix missing sord_validate Parnikkapore via Guix-patches via
2024-04-20 23:02 ` [bug#70487] [PATCH core-updates 3/4] gnu: lv2: Hard-code path for sord_validate Parnikkapore via Guix-patches via
2024-04-20 23:02 ` Parnikkapore via Guix-patches via [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ad4b3dc6f1788dc11b325d8c201023ee33dcaaa.1713647481.git.poomklao@yahoo.com \
--to=guix-patches@gnu.org \
--cc=70487@debbugs.gnu.org \
--cc=poomklao@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.