unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to use pipewire for jack application?
@ 2023-12-22  3:52 Apoorv via
  2024-02-15 16:25 ` Simon Tournier
  0 siblings, 1 reply; 2+ messages in thread
From: Apoorv via @ 2023-12-22  3:52 UTC (permalink / raw)
  To: Help Guix

On system like Arch Linux, there is a package pipewire-jack which you can install and then any app that can use jack automatically sees the jack server running. On Guix there is no such thing. I can do pw-jack APP from command line to launch the said app such that it can utilize jack.

How does one automate this like Arch Linux does for example?

Here is my pipewire home service,

(define-module (apoorv home services pipewire)
  #:use-module (gnu packages)
  #:use-module (gnu packages linux)
  #:use-module (gnu services)
  #:use-module (gnu services configuration)
  #:use-module (gnu home services)
  #:use-module (gnu home services shepherd)
  #:use-module (guix gexp))

(define (home-pipewire-profile-service config)
  (map specification->package
       (list "pipewire"
             "wireplumber")))

(define (home-pipewire-shepherd-service config)
  (list
   ;; Start Pipewire daemon
   (shepherd-service
    (requirement '(dbus))
    (provision '(pipewire))
    (documentation "Starts the pipewire daemon")
    (stop  #~(make-kill-destructor))
    (start #~(make-forkexec-constructor
              (list #$(file-append pipewire "/bin/pipewire"))
              #:log-file (string-append
                          (or (getenv "XDG_LOG_HOME")
                              (format #f "~a/.local/var/log"
                                      (getenv "HOME")))
                          "/pipewire.log")
              #:environment-variables
              (append (list "DISABLE_RTKIT=1")
                      (default-environment-variables)))))
   ;; Start Pipewire PulseAudio module
   (shepherd-service
    (requirement '(pipewire))
    (provision '(pipewire-pulse))
    (documentation "Starts the pipewire pulseaudio module")
    (stop  #~(make-kill-destructor))
    (start #~(make-forkexec-constructor
              (list #$(file-append pipewire "/bin/pipewire-pulse"))
              #:log-file (string-append
                          (or (getenv "XDG_LOG_HOME")
                              (format #f "~a/.local/var/log"
                                      (getenv "HOME")))
                          "/pipewire-pulse.log")
              #:environment-variables
              (append (list "DISABLE_RTKIT=1")
                      (default-environment-variables)))))
   ;; Start Wireplumber session manager
   (shepherd-service
    (requirement '(pipewire))
    (provision '(wireplumber))
    (documentation "Starts the wireplumber session manager")
    (stop  #~(make-kill-destructor))
    (start #~(make-forkexec-constructor
              (list #$(file-append wireplumber "/bin/wireplumber"))
              #:log-file (string-append
                          (or (getenv "XDG_LOG_HOME")
                              (format #f "~a/.local/var/log"
                                      (getenv "HOME")))
                          "/wireplumber.log")
              #:environment-variables
              (append (list "DISABLE_RTKIT=1")
                      (default-environment-variables)))))))

(define (home-pipewire-xdg-configuration-service config)
  `(("alsa/asoundrc"
     ,(mixed-text-file
       "asoundrc"
       #~(string-append
          "<"
          #$(file-append
             pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf")
          ">\n<"
          #$(file-append
             pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf")
          ">\n"
          "
pcm_type.pipewire {
  lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so")
  "
}
ctl_type.pipewire {
  lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so")
  "
}
")))))

(define-public home-pipewire-service-type
  (service-type (name 'home-pipewire)
                (description "Configures and runs the Pipewire audio system.")
                (extensions
                 (list (service-extension
                        home-profile-service-type
                        home-pipewire-profile-service)
                       (service-extension
                        home-shepherd-service-type
                        home-pipewire-shepherd-service)
                       (service-extension
                        home-xdg-configuration-files-service-type
                        home-pipewire-xdg-configuration-service)))
                (default-value #f)))
-- 
 Sent with Tuta; enjoy secure & ad-free emails: 
 https://tuta.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to use pipewire for jack application?
  2023-12-22  3:52 How to use pipewire for jack application? Apoorv via
@ 2024-02-15 16:25 ` Simon Tournier
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Tournier @ 2024-02-15 16:25 UTC (permalink / raw)
  To: Apoorv, Help Guix; +Cc: Ricardo Wurmus

Hi,

Well, I have missed if you get an reply. :-)

On ven., 22 déc. 2023 at 04:52, Apoorv via <help-guix@gnu.org> wrote:
> On system like Arch Linux, there is a package pipewire-jack which you
> can install and then any app that can use jack automatically sees the
> jack server running. On Guix there is no such thing. I can do pw-jack
> APP from command line to launch the said app such that it can utilize
> jack.
>
> How does one automate this like Arch Linux does for example?

I do not use this so I cannot help.  Maybe Ricardo?

Cheers,
simon


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-15 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22  3:52 How to use pipewire for jack application? Apoorv via
2024-02-15 16:25 ` Simon Tournier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).