switch to upstream pipewire and pulseaudio

This commit is contained in:
Freya Murphy 2024-10-24 10:10:04 -04:00
parent 18d741efee
commit 479668f611
Signed by: freya
GPG key ID: 744AB800E383AE52
7 changed files with 18 additions and 173 deletions

View file

@ -5,8 +5,8 @@
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix build-system cargo) #:use-module (guix build-system cargo)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages linux)
#:use-module (gnu packages crates-io) #:use-module (gnu packages crates-io)
#:use-module (sakura packages linux)
#:use-module (guix utils)) #:use-module (guix utils))
@ -174,7 +174,7 @@
("rust-rand" ,rust-rand-0.8) ("rust-rand" ,rust-rand-0.8)
("rust-tokio" ,rust-tokio-1)))) ("rust-tokio" ,rust-tokio-1))))
(inputs (inputs
(list bluez-new)) (list bluez))
(home-page "https://github.com/bluez/bluer") (home-page "https://github.com/bluez/bluer")
(synopsis "Official Rust interface to the Linux Bluetooth protocol stack (BlueZ)") (synopsis "Official Rust interface to the Linux Bluetooth protocol stack (BlueZ)")
(description "todo") (description "todo")

View file

@ -578,7 +578,7 @@ mo .")
sdbus-c++ sdbus-c++
slurp slurp
qtbase qtbase
pipewire-new pipewire
qtwayland qtwayland
; hypr ; hypr
hyprland hyprland

View file

@ -6,12 +6,11 @@
#:use-module (gnu) #:use-module (gnu)
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages librewolf) #:use-module (gnu packages librewolf))
#:use-module (sakura packages linux))
(define-public librewolf-new (define-public librewolf-wrapped
(package (package
(name "librewolf-new") (name "librewolf-wrapped")
(source #f) (source #f)
(version "0.1") (version "0.1")
(synopsis "Simple wrapper for pipewire in librewolf") (synopsis "Simple wrapper for pipewire in librewolf")
@ -20,7 +19,7 @@
(license license:mpl2.0) (license license:mpl2.0)
(inputs (inputs
`(("bash" ,bash-minimal) `(("bash" ,bash-minimal)
("pipewire" ,pipewire-new) ("pipewire" ,pipewire)
("librewolf" ,librewolf))) ("librewolf" ,librewolf)))
(build-system trivial-build-system) (build-system trivial-build-system)
(arguments (arguments

View file

@ -1,107 +0,0 @@
(define-module (sakura packages linux)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (gnu packages)
#:use-module (gnu packages linux)
#:use-module (gnu packages python-xyz)
#:use-module (sakura packages pulseaudio))
(define-public bluez-new
(package
(inherit bluez)
(version "5.78")
(source
(origin
(method url-fetch)
(uri (string-append
"mirror://kernel.org/linux/bluetooth/bluez-"
version ".tar.xz"))
(sha256
(base32
"1qy5fc6z1l3fvcqkvyszzz2xr86yzi2nyphgvsw7bly52lcys3w3"))))
(arguments (list
#:configure-flags
#~(list (string-append "--prefix=" #$output)
"--sysconfdir=/etc"
"--localstatedir=/var"
"--enable-library"
"--disable-manpages"
"--disable-systemd"
"--enable-hid2hci"
(string-append "--with-dbusconfdir=" #$output "/etc")
(string-append "--with-udevdir=" #$output "/lib/udev"))
#:phases
#~(modify-phases %standard-phases
(add-after 'configure 'fix-makefile
(lambda _
(substitute* "Makefile"
(("install-confDATA:") "install-IGNORED:")
(("install-confDATA") "")
(("bluetoothd-fix-permissions:") "install-IGNORED2:")
(("bluetoothd-fix-permissions") "")))))
))
))
(define-public alsa-lib-new
(package
(inherit alsa-lib)
(name "alsa-lib")
(version "1.2.12")
(source (origin
(method url-fetch)
(uri (string-append
"ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
version ".tar.bz2"))
(sha256
(base32
"1lnh38wii8mnwp3n4hnqa718rgi52rq6ix1llsjrs9r7hs8css28"))))))
(define-public pipewire-new
(package
(inherit pipewire)
(name "pipewire")
(version "1.2.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.freedesktop.org/pipewire/pipewire")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0cvbyklzqcdr9zj7k7psb24xp8cxb9fdksrd74r68zvnbbix1qlx"))))
(inputs
(modify-inputs (package-inputs pipewire)
(delete "alsa-lib")
(delete "bluez")
(delete "pulseaudio")
(prepend alsa-lib-new)
(prepend bluez-new)
(prepend pulseaudio-new)))))
(define-public wireplumber-new
(package
(inherit wireplumber)
(name "wireplumber")
(version "0.5.5")
(source
(origin
(method git-fetch)
(uri (git-reference
(url
"https://gitlab.freedesktop.org/pipewire/wireplumber.git")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "1s9p2hpi9v4w70j6hhqnsa4czhn3rzrk03j0qb7lz87qlw491yks"))))
(inputs
(modify-inputs
(package-inputs wireplumber)
(delete "pipewire")
(prepend pipewire-new)))))

View file

@ -23,7 +23,6 @@
#:use-module (gnu packages gettext) #:use-module (gnu packages gettext)
#:use-module (gnu packages rust) #:use-module (gnu packages rust)
#:use-module (sakura packages) #:use-module (sakura packages)
#:use-module (sakura packages linux)
#:use-module (sakura packages crates-io) #:use-module (sakura packages crates-io)
#:use-module (sakura packages pulseaudio)) #:use-module (sakura packages pulseaudio))
@ -120,20 +119,9 @@
gcc-13 gcc-13
dbus dbus
libadwaita libadwaita
pulseaudio-new pulseaudio
bluez-new)) bluez))
(home-page "https://github.com/kaii-lb/overskride") (home-page "https://github.com/kaii-lb/overskride")
(synopsis "A simple yet powerful bluetooth client.") (synopsis "A simple yet powerful bluetooth client.")
(description "todo") (description "todo")
(license license:gpl3+))) (license license:gpl3+)))
(define-public blueman-new
(package
(inherit blueman)
(inputs
(modify-inputs
(package-inputs blueman)
(delete "bluez")
(prepend bluez-new)))))

View file

@ -1,34 +0,0 @@
(define-module (sakura packages pulseaudio)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages pulseaudio)
#:use-module (sakura packages linux))
(define-public pulseaudio-new
(package
(inherit pulseaudio)
(name "pulseaudio")
(version "17.0")
(source (origin
(method url-fetch)
(uri (string-append
"https://freedesktop.org/software/pulseaudio/releases/"
name "-" version ".tar.xz"))
(sha256
(base32
"1dc7xdfbn5rknwsvv5m2ijfwnqrap208liwyhiykjghsczb98dq5"))))
(arguments
(substitute-keyword-arguments (package-arguments pulseaudio)
((#:phases phases)
#~(modify-phases #$phases
(delete 'check)))))
(inputs
(modify-inputs (package-inputs pulseaudio)
(delete "alsa-lib")
(delete "bluez")
(prepend alsa-lib-new)
(prepend bluez-new)))))

View file

@ -5,13 +5,12 @@
#:use-module (gnu services configuration) #:use-module (gnu services configuration)
#:use-module (gnu home services) #:use-module (gnu home services)
#:use-module (gnu home services shepherd) #:use-module (gnu home services shepherd)
#:use-module (sakura packages linux)
#:use-module (sakura packages networking) #:use-module (sakura packages networking)
#:use-module (guix gexp)) #:use-module (guix gexp))
(define (home-pipewire-profile-service config) (define (home-pipewire-profile-service config)
(list pipewire-new (list pipewire
wireplumber-new)) wireplumber))
(define (home-pipewire-shepherd-service config) (define (home-pipewire-shepherd-service config)
@ -22,7 +21,7 @@
(provision '(pipewire)) (provision '(pipewire))
(stop #~(make-kill-destructor)) (stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
(list #$(file-append pipewire-new "/bin/pipewire")) (list #$(file-append pipewire "/bin/pipewire"))
#:log-file (string-append #:log-file (string-append
(or (getenv "XDG_LOG_HOME") (or (getenv "XDG_LOG_HOME")
(format #f "~a/.local/var/log" (format #f "~a/.local/var/log"
@ -37,7 +36,7 @@
(provision '(pipewire-pulse)) (provision '(pipewire-pulse))
(stop #~(make-kill-destructor)) (stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
(list #$(file-append pipewire-new "/bin/pipewire-pulse")) (list #$(file-append pipewire "/bin/pipewire-pulse"))
#:log-file (string-append #:log-file (string-append
(or (getenv "XDG_LOG_HOME") (or (getenv "XDG_LOG_HOME")
(format #f "~a/.local/var/log" (format #f "~a/.local/var/log"
@ -52,7 +51,7 @@
(provision '(wireplumber)) (provision '(wireplumber))
(stop #~(make-kill-destructor)) (stop #~(make-kill-destructor))
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
(list #$(file-append wireplumber-new "/bin/wireplumber")) (list #$(file-append wireplumber "/bin/wireplumber"))
#:log-file (string-append #:log-file (string-append
(or (getenv "XDG_LOG_HOME") (or (getenv "XDG_LOG_HOME")
(format #f "~a/.local/var/log" (format #f "~a/.local/var/log"
@ -69,18 +68,18 @@
#~(string-append #~(string-append
"<" "<"
#$(file-append #$(file-append
pipewire-new "/share/alsa/alsa.conf.d/50-pipewire.conf") pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf")
">\n<" ">\n<"
#$(file-append #$(file-append
pipewire-new "/share/alsa/alsa.conf.d/99-pipewire-default.conf") pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf")
">\n" ">\n"
" "
pcm_type.pipewire { pcm_type.pipewire {
lib " #$(file-append pipewire-new "/lib/alsa-lib/libasound_module_pcm_pipewire.so") lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so")
" "
} }
ctl_type.pipewire { ctl_type.pipewire {
lib " #$(file-append pipewire-new "/lib/alsa-lib/libasound_module_ctl_pipewire.so") lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so")
" "
} }
"))))) ")))))