aboutsummaryrefslogtreecommitdiff
path: root/etc/guix-gc.service.in
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-03-19 14:44:48 +0100
committerRicardo Wurmus <rekado@elephly.net>2023-03-19 16:11:58 +0100
commit8a52db698910f37ae1a53fd59385ac4a4b78b346 (patch)
tree7b1341ea484dc32be1bf19f7a3947ffa6c94976c /etc/guix-gc.service.in
parent843e4cc583dafc9a999113cea6598f36d113143c (diff)
downloadguix-8a52db698910f37ae1a53fd59385ac4a4b78b346.tar.gz
guix-8a52db698910f37ae1a53fd59385ac4a4b78b346.zip
gnu: r-hmisc: Update to 5.0-1.
* gnu/packages/statistics.scm (r-hmisc): Update to 5.0-1. [propagated-inputs]: Remove r-lattice, r-latticeextra, and r-survival; add r-colorspace, r-knitr, and r-rmarkdown.
Diffstat (limited to 'etc/guix-gc.service.in')
0 files changed, 0 insertions, 0 deletions
\n" "}\n" "ctl_type.pipewire {\n" " lib \"" pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so\"\n" "}\n" extra-content))) (define home-pipewire-disable-pulseaudio-auto-start (plain-file "client.conf" "autospawn = no")) (define (home-pipewire-xdg-configuration config) (cons* `("alsa/asoundrc" ,(home-pipewire-asoundrc config)) (if (home-pipewire-configuration-enable-pulseaudio? config) `(("pulse/client.conf" ,home-pipewire-disable-pulseaudio-auto-start)) '()))) (define home-pipewire-service-type (service-type (name 'pipewire) (extensions (list (service-extension home-shepherd-service-type home-pipewire-shepherd-services) (service-extension home-xdg-configuration-files-service-type home-pipewire-xdg-configuration))) (description "Start essential PipeWire services.") (default-value (home-pipewire-configuration)))) ;;; ;;; PulseAudio support. ;;; (define (with-pulseaudio-connection sock exp) ;; Wrap EXP in an expression where SOCK is bound to a socket connected to ;; the user's PulseAudio command-line interface socket. #~(let* ((#$sock (socket AF_UNIX SOCK_STREAM 0)) (pulse-user-file (lambda (name) (string-append "/run/user/" (number->string (getuid)) "/pulse/" name))) (file (pulse-user-file "cli"))) (let loop ((tries 0)) (catch #t (lambda () (connect #$sock AF_UNIX file) (let ((result #$exp)) (close-port #$sock) result)) (lambda (key . args) (if (and (eq? key 'system-error) (= ENOENT (system-error-errno (cons key args))) (< tries 3)) ;; The CLI socket doesn't exist yet, so send pulseaudio ;; SIGUSR2 so that it creates it and listens to it. (let ((pid (call-with-input-file (pulse-user-file "pid") read))) (when (and (integer? pid) (> pid 1)) (kill pid SIGUSR2)) ((@ (fibers) sleep) 1) (loop (+ tries 1))) (begin (close-port #$sock) (apply throw key args)))))))) (define %pulseaudio-rtp-multicast-address ;; Default address used by 'module-rtp-sink' and 'module-rtp-recv'. This is ;; a multicast address, for the Session Announcement Protocol (SAP) and the ;; Session Description Protocol (SDP). "224.0.0.56") (define (pulseaudio-rtp-sink-shepherd-services destination-ip) (list (shepherd-service (provision '(pulseaudio-rtp-sink)) (start #~(lambda* (#:optional (destination-ip #$destination-ip)) #$(with-pulseaudio-connection #~sock #~(begin (display "\ load-module module-null-sink \ sink_name=rtp sink_properties=\"device.description='RTP network output'\"\n" sock) (display (string-append "\ load-module module-rtp-send source=rtp.monitor" (if destination-ip (string-append " destination_ip=" destination-ip) "") "\n") sock) #t)))) (stop #~(lambda (_) #$(with-pulseaudio-connection #~sock #~(begin (display "unload-module module-rtp-send\n" sock) (display "unload-module module-null-sink\n" sock) #f)))) (auto-start? #f)))) (define home-pulseaudio-rtp-sink-service-type (service-type (name 'pulseaudio-rtp-sink) (extensions (list (service-extension home-shepherd-service-type pulseaudio-rtp-sink-shepherd-services))) (description "Define a PulseAudio sink to broadcast audio output over RTP, which can then by played by another PulseAudio instance.") ;; By default, send to the SAP multicast address, 224.0.0.56, which can be ;; network-intensive. (default-value %pulseaudio-rtp-multicast-address))) (define (pulseaudio-rtp-source-shepherd-services source-ip) (list (shepherd-service (provision '(pulseaudio-rtp-source)) (start #~(lambda* (#:optional (source-ip #$source-ip)) #$(with-pulseaudio-connection #~sock #~(begin (format sock "\ load-module module-rtp-recv sap_address=~a\n" source-ip) #t)))) (stop #~(lambda (_) #$(with-pulseaudio-connection #~sock #~(begin (display "unload-module module-rtp-recv\n" sock) #f)))) (auto-start? #f)))) (define home-pulseaudio-rtp-source-service-type (service-type (name 'pulseaudio-rtp-source) (extensions (list (service-extension home-shepherd-service-type pulseaudio-rtp-source-shepherd-services))) (description "Define a PulseAudio source to receive audio broadcasted over RTP by another PulseAudio instance.") (default-value %pulseaudio-rtp-multicast-address)))