From f1022fbf2f16b0c9ae9fa0f8af4e61e035fec4cf Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 10 Jan 2020 02:48:22 +0100 Subject: services: Split ladspa-service-type from pulseaudio-service-type. * gnu/services/sound.scm (ladspa-configuration): New record. (ladspa-environment): New procedure. (ladspa-service-type): New service type. (pulseaudio-environment): Remove LADSPA_PATH. * doc/guix.texi: Adjust documentation. Signed-off-by: Marius Bakke --- gnu/services/sound.scm | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index 4ec6120ac7..a1c928222a 100644 --- a/gnu/services/sound.scm +++ b/gnu/services/sound.scm @@ -36,7 +36,10 @@ (define-module (gnu services sound) alsa-service-type pulseaudio-configuration - pulseaudio-service-type)) + pulseaudio-service-type + + ladspa-configuration + ladspa-service-type)) ;;; Commentary: ;;; @@ -125,10 +128,7 @@ (define-record-type* (file-append pulseaudio "/etc/pulse/system.pa")))) (define (pulseaudio-environment config) - ;; Define this variable in the global environment such that - ;; pulseaudio swh-plugins works. - `(("LADSPA_PATH" . ,(file-append swh-plugins "/lib/ladspa")) - ;; Define these variables, so that pulseaudio honors /etc. + `(;; Define these variables, so that pulseaudio honors /etc. ("PULSE_CONFIG" . "/etc/pulse/daemon.conf") ("PULSE_CLIENTCONFIG" . "/etc/pulse/client.conf"))) @@ -166,4 +166,32 @@ (define pulseaudio-service-type (default-value (pulseaudio-configuration)) (description "Configure PulseAudio sound support."))) + +;;; +;;; LADSPA +;;; + +(define-record-type* + ladspa-configuration make-ladspa-configuration + ladspa-configuration? + (plugins ladspa-plugins (default '()))) + +(define (ladspa-environment config) + ;; Define this variable in the global environment such that + ;; pulseaudio swh-plugins (and similar LADSPA plugins) work. + `(("LADSPA_PATH" . + (string-join + ',(map (lambda (package) (file-append package "/lib/ladspa")) + (ladspa-plugins config)) + ":")))) + +(define ladspa-service-type + (service-type + (name 'ladspa) + (extensions + (list (service-extension session-environment-service-type + ladspa-environment))) + (default-value (ladspa-configuration)) + (description "Configure LADSPA plugins."))) + ;;; sound.scm ends here -- cgit v1.2.3