diff options
author | David Thompson <dthompson2@worcester.edu> | 2024-02-17 11:50:45 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2024-02-18 12:50:25 -0500 |
commit | b4de52e2b5c986c5477132d9688b8270bf67767e (patch) | |
tree | 1f4a253b8de91851b50a2e0026319c96add6c11a | |
parent | e5db74e2e13f90f4b4b7b42ceca230fd89677bdc (diff) |
Add package-with-pw-jack helper and use it for ardour.
-rw-r--r-- | dthompson/home/pipewire.scm | 48 | ||||
-rw-r--r-- | dthompson/machines/ikaruga.scm | 134 |
2 files changed, 116 insertions, 66 deletions
diff --git a/dthompson/home/pipewire.scm b/dthompson/home/pipewire.scm index bff47ea..600db49 100644 --- a/dthompson/home/pipewire.scm +++ b/dthompson/home/pipewire.scm @@ -1,6 +1,9 @@ ;; Snarfed from David Wilson who I believe snarfed from Andrew Tropin. (define-module (dthompson home pipewire) + #:use-module (guix build-system trivial) + #:use-module (guix packages) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages linux) #:use-module (gnu services) #:use-module (gnu services configuration) @@ -98,3 +101,48 @@ ctl_type.pipewire { home-pipewire-xdg-configuration-service))) (default-value #f) (description "Configures and runs the Pipewire audio system."))) + +(define-public (package-with-pw-jack pkg program) + (package + (name (package-name pkg)) + (version (package-version pkg)) + (source #f) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build union) + (guix build utils)) + #:builder + #~(begin + (use-modules (ice-9 match) + (guix build union) + (guix build utils)) + (let* ((program (string-append #$output "/bin/" #$program)) + (program* (string-append program ".real")) + (desktop (string-append #$output "/share/applications/" + #$program ".desktop"))) + (union-build #$output (list #$pkg) + #:create-all-directories? #t) + (when (file-exists? desktop) + (substitute* desktop + (("Exec=.*") + (string-append "Exec=" program "\n")))) + (rename-file program program*) + (call-with-output-file program + (lambda (port) + (display "#!" port) + (display #$bash-minimal port) + (display "/bin/sh" port) + (newline port) + (display "exec " port) + (display #$pipewire port) + (display "/bin/pw-jack " port) + (display program* port) + (display " \"$@\"" port) + (newline port))) + (chmod program #x555) + #t)))) + (synopsis (package-synopsis pkg)) + (description (package-description pkg)) + (home-page (package-home-page pkg)) + (license (package-license pkg)))) diff --git a/dthompson/machines/ikaruga.scm b/dthompson/machines/ikaruga.scm index 0f4e402..9e005a0 100644 --- a/dthompson/machines/ikaruga.scm +++ b/dthompson/machines/ikaruga.scm @@ -149,71 +149,73 @@ (define-public ikaruga-home (home-environment - (packages (specifications->packages - '("ardour" - "blender" - "calf" - "dragonfly-reverb" - "emacs" - "emacs-better-defaults" - "emacs-buffer-env" - "emacs-doom-modeline" - "emacs-doom-themes" - "emacs-flycheck-guile" - "emacs-geiser-guile" - "emacs-htmlize" - "emacs-js2-mode" - "emacs-magit" - "emacs-magit-annex" - "emacs-markdown-mode" - "emacs-org-reveal" - "emacs-paredit" - "emacs-racket-mode" - "emacs-rainbow-delimiters" - "emacs-smex" - "emacs-typo" - "emacs-use-package" - "emacs-web-mode" - "emacs-which-key" - "emacs-yaml-mode" - "firefox" - "font-google-noto-emoji" - "font-google-noto-sans-cjk" - "font-google-noto-serif-cjk" - "font-inconsolata" - "gimp" - "git" - "git:send-email" - "git-annex" - "gnome-boxes" - "gnome-tweaks" - "gnupg" - "google-chrome-unstable" - "gst-plugins-bad" - "guile@3" - "htop" - "hydrogen" - "keepassxc" - "libreoffice" - "libresprite" - "lsp-plugins" - "milkytracker" - "ncurses" - "obs" - "openssh" - "pavucontrol" - "pinentry" - "qpwgraph" - "quodlibet" - "sfxr" - "sicp" - "steam" - "strace" - "tiled" - "tor" - "vlc" - "x42-plugins" - "xournal" - "yt-dlp"))) + (packages + (cons (package-with-pw-jack (specification->package "ardour") + "ardour8") + (specifications->packages + '("blender" + "calf" + "dragonfly-reverb" + "emacs" + "emacs-better-defaults" + "emacs-buffer-env" + "emacs-doom-modeline" + "emacs-doom-themes" + "emacs-flycheck-guile" + "emacs-geiser-guile" + "emacs-htmlize" + "emacs-js2-mode" + "emacs-magit" + "emacs-magit-annex" + "emacs-markdown-mode" + "emacs-org-reveal" + "emacs-paredit" + "emacs-racket-mode" + "emacs-rainbow-delimiters" + "emacs-smex" + "emacs-typo" + "emacs-use-package" + "emacs-web-mode" + "emacs-which-key" + "emacs-yaml-mode" + "firefox" + "font-google-noto-emoji" + "font-google-noto-sans-cjk" + "font-google-noto-serif-cjk" + "font-inconsolata" + "gimp" + "git" + "git:send-email" + "git-annex" + "gnome-boxes" + "gnome-tweaks" + "gnupg" + "google-chrome-unstable" + "gst-plugins-bad" + "guile@3" + "htop" + "hydrogen" + "keepassxc" + "libreoffice" + "libresprite" + "lsp-plugins" + "milkytracker" + "ncurses" + "obs" + "openssh" + "pavucontrol" + "pinentry" + "qpwgraph" + "quodlibet" + "sfxr" + "sicp" + "steam" + "strace" + "tiled" + "tor" + "vlc" + "x42-plugins" + "xournal" + "yt-dlp")))) (services (cons (service home-pipewire-service-type) common-services)))) |