From 479668f6110893ed5f41ff7052c0105dabbafea3 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 24 Oct 2024 10:10:04 -0400 Subject: [PATCH] switch to upstream pipewire and pulseaudio --- sakura/packages/crates-io.scm | 4 +- sakura/packages/hypr.scm | 2 +- sakura/packages/librewolf.scm | 9 ++- sakura/packages/linux.scm | 107 --------------------------------- sakura/packages/networking.scm | 16 +---- sakura/packages/pulseaudio.scm | 34 ----------- sakura/services/pipewire.scm | 19 +++--- 7 files changed, 18 insertions(+), 173 deletions(-) delete mode 100644 sakura/packages/linux.scm delete mode 100644 sakura/packages/pulseaudio.scm diff --git a/sakura/packages/crates-io.scm b/sakura/packages/crates-io.scm index 51e53c1..a996b5b 100644 --- a/sakura/packages/crates-io.scm +++ b/sakura/packages/crates-io.scm @@ -5,8 +5,8 @@ #:use-module (guix download) #:use-module (guix build-system cargo) #:use-module (gnu packages) + #:use-module (gnu packages linux) #:use-module (gnu packages crates-io) - #:use-module (sakura packages linux) #:use-module (guix utils)) @@ -174,7 +174,7 @@ ("rust-rand" ,rust-rand-0.8) ("rust-tokio" ,rust-tokio-1)))) (inputs - (list bluez-new)) + (list bluez)) (home-page "https://github.com/bluez/bluer") (synopsis "Official Rust interface to the Linux Bluetooth protocol stack (BlueZ)") (description "todo") diff --git a/sakura/packages/hypr.scm b/sakura/packages/hypr.scm index 9629f3b..f971fd0 100644 --- a/sakura/packages/hypr.scm +++ b/sakura/packages/hypr.scm @@ -578,7 +578,7 @@ mo .") sdbus-c++ slurp qtbase - pipewire-new + pipewire qtwayland ; hypr hyprland diff --git a/sakura/packages/librewolf.scm b/sakura/packages/librewolf.scm index 5900071..7139377 100644 --- a/sakura/packages/librewolf.scm +++ b/sakura/packages/librewolf.scm @@ -6,12 +6,11 @@ #:use-module (gnu) #:use-module (gnu packages bash) #:use-module (gnu packages linux) - #:use-module (gnu packages librewolf) - #:use-module (sakura packages linux)) + #:use-module (gnu packages librewolf)) -(define-public librewolf-new +(define-public librewolf-wrapped (package - (name "librewolf-new") + (name "librewolf-wrapped") (source #f) (version "0.1") (synopsis "Simple wrapper for pipewire in librewolf") @@ -20,7 +19,7 @@ (license license:mpl2.0) (inputs `(("bash" ,bash-minimal) - ("pipewire" ,pipewire-new) + ("pipewire" ,pipewire) ("librewolf" ,librewolf))) (build-system trivial-build-system) (arguments diff --git a/sakura/packages/linux.scm b/sakura/packages/linux.scm deleted file mode 100644 index a4e2350..0000000 --- a/sakura/packages/linux.scm +++ /dev/null @@ -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))))) diff --git a/sakura/packages/networking.scm b/sakura/packages/networking.scm index 19c13b8..57e4190 100644 --- a/sakura/packages/networking.scm +++ b/sakura/packages/networking.scm @@ -23,7 +23,6 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages rust) #:use-module (sakura packages) - #:use-module (sakura packages linux) #:use-module (sakura packages crates-io) #:use-module (sakura packages pulseaudio)) @@ -120,20 +119,9 @@ gcc-13 dbus libadwaita - pulseaudio-new - bluez-new)) + pulseaudio + bluez)) (home-page "https://github.com/kaii-lb/overskride") (synopsis "A simple yet powerful bluetooth client.") (description "todo") (license license:gpl3+))) - - -(define-public blueman-new - (package - (inherit blueman) - (inputs - (modify-inputs - (package-inputs blueman) - (delete "bluez") - (prepend bluez-new))))) - diff --git a/sakura/packages/pulseaudio.scm b/sakura/packages/pulseaudio.scm deleted file mode 100644 index fc24691..0000000 --- a/sakura/packages/pulseaudio.scm +++ /dev/null @@ -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))))) diff --git a/sakura/services/pipewire.scm b/sakura/services/pipewire.scm index e2ef67e..eccb5a9 100644 --- a/sakura/services/pipewire.scm +++ b/sakura/services/pipewire.scm @@ -5,13 +5,12 @@ #:use-module (gnu services configuration) #:use-module (gnu home services) #:use-module (gnu home services shepherd) - #:use-module (sakura packages linux) #:use-module (sakura packages networking) #:use-module (guix gexp)) (define (home-pipewire-profile-service config) - (list pipewire-new - wireplumber-new)) + (list pipewire + wireplumber)) (define (home-pipewire-shepherd-service config) @@ -22,7 +21,7 @@ (provision '(pipewire)) (stop #~(make-kill-destructor)) (start #~(make-forkexec-constructor - (list #$(file-append pipewire-new "/bin/pipewire")) + (list #$(file-append pipewire "/bin/pipewire")) #:log-file (string-append (or (getenv "XDG_LOG_HOME") (format #f "~a/.local/var/log" @@ -37,7 +36,7 @@ (provision '(pipewire-pulse)) (stop #~(make-kill-destructor)) (start #~(make-forkexec-constructor - (list #$(file-append pipewire-new "/bin/pipewire-pulse")) + (list #$(file-append pipewire "/bin/pipewire-pulse")) #:log-file (string-append (or (getenv "XDG_LOG_HOME") (format #f "~a/.local/var/log" @@ -52,7 +51,7 @@ (provision '(wireplumber)) (stop #~(make-kill-destructor)) (start #~(make-forkexec-constructor - (list #$(file-append wireplumber-new "/bin/wireplumber")) + (list #$(file-append wireplumber "/bin/wireplumber")) #:log-file (string-append (or (getenv "XDG_LOG_HOME") (format #f "~a/.local/var/log" @@ -69,18 +68,18 @@ #~(string-append "<" #$(file-append - pipewire-new "/share/alsa/alsa.conf.d/50-pipewire.conf") + pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf") ">\n<" #$(file-append - pipewire-new "/share/alsa/alsa.conf.d/99-pipewire-default.conf") + pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf") ">\n" " 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 { - 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") " } ")))))