Subject: [bug#38127] [PATCH] gnu: Add x42-plugins.

From: Alexandros Theodotou <[email-masked]>
Date: Mon, 11 Nov 2019 01:53:02 +0000

Thanks for the pointers!

> The patch LGTM overall, but indentation seems to be off.  Can you run
> this through "./etc/indent-code.el"?
That script gives me weird indentation that I don't see in any
packages, like:
(define-public dpf-plugins
  (package
   (name
   ^ missing space

Hopefully the updated patch looks better, I tried to match the other
packages in music.scm.

> > +audio and MIDI plugins that can also run as standalone JACK 
> > applications.")
> > +    (home-page "https://x42-plugins.com/x42/")
> > +    (license license:gpl2+)))
> 
> I notice in the FAQ that "Some binaries are provided as demo.  A
> license/signature file is required to remove the evaluation
> restrictions".
> 
> If there are such binaries in the source tarball, they must be
> removed
> with a source 'snippet' to ensure 'guix build --source' contains only
> free software.
This tarball only contains sources and is specifically targeted at
distro packagers (see https://github.com/x42/x42-plugins). I believe
the binaries are provided as separate downloads on the website.
From 05ffc94c834f99b3cb56a9ebc97096958a07981e Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <[email-masked]>
Date: Fri, 8 Nov 2019 10:54:00 +0000
Subject: [PATCH] gnu: Add x42-plugins.

* gnu/packages/music.scm: (x42-plugins): New variable.
---
 gnu/packages/music.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 2f023685df..5efdae31e4 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -4737,3 +4737,58 @@ for integration into status line generators or other command-line tools.")
 effects.  It contains a bitcrusher, delay, distortion, equalizer, compressor,
 and reverb.")
     (license license:gpl2+)))
+
+(define-public x42-plugins
+  (package
+    (name "x42-plugins")
+    (version "20191013")
+    (source
+      (origin
+        (method url-fetch)
+        (uri
+          (string-append "http://gareus.org/misc/x42-plugins/x42-plugins-"
+                         version ".tar.xz"))
+        (sha256
+          (base32
+            "18kn1bmc0s6dp834kc51ibifzzn3bxwya4p8s8yq9f4mpmkghi24"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f  ; no "check" target
+       #:make-flags
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             "LIBZITACONVOLVER=-lzita-convolver"
+             (string-append "FONTFILE="
+                            (assoc-ref %build-inputs "font-dejavu")
+                            "/share/fonts/truetype/DejaVuSans-Bold.ttf"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-CC-variable
+           (lambda _
+             (setenv "CC" "gcc")
+             #t))
+         (delete 'configure))))
+    (inputs
+     `(("cairo" ,cairo)
+       ("fftwf" ,fftwf)
+       ("jack" ,jack-1)
+       ("fftw" ,fftw)
+       ("ftgl" ,ftgl)
+       ("glib" ,glib)
+       ("glu" ,glu)
+       ("hicolor-icon-theme" ,hicolor-icon-theme)
+       ("libsamplerate" ,libsamplerate)
+       ("libx11" ,libx11)
+       ("libltc" ,libltc)
+       ("pango" ,pango)
+       ("zita-convolver" ,zita-convolver)))
+    (native-inputs
+     `(("help2man" ,help2man)
+       ("liblo" ,liblo)
+       ("lv2" ,lv2)
+       ("font-dejavu" ,font-dejavu)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Collection of LV2/JACK audio/MIDI processing plugins")
+    (description "x42-plugins is a collection of over 80 cross-platform LV2
+audio and MIDI plugins that can also run as standalone JACK applications.")
+    (home-page "https://x42-plugins.com/x42/")
+    (license license:gpl2+)))
-- 
2.24.0