make better

This commit is contained in:
Murphy 2023-09-05 21:07:58 -04:00
parent 4c1308f3bf
commit c63e81fc77
No known key found for this signature in database
GPG key ID: 988032A5638EE799
6 changed files with 154 additions and 61 deletions

View file

@ -17,7 +17,8 @@
(gnu home services gnupg)
(gnu home services)
(home-services pipewire)
(home-packages easyeffects))
(home-packages mozillia)
(home-packages audio))
(define my-neovim
(package
@ -56,7 +57,6 @@
"mpv"
"git"
"pinentry"
"firefox"
"ungoogled-chromium"
"element-desktop"
"nm-tray"
@ -65,18 +65,19 @@
"brightnessctl"
"neofetch"
"python"
"openjdk"
"maven"
"make"
"tree"
"rlwrap"
"netcat"
"rust-libc"
"rust-gcc"
"ripgrep"
"fd"
"node"
"tree-sitter-cli"
"python-pynvim"))
(list my-neovim easyeffects)))
(list my-neovim easyeffects firefox-wayland-new)))
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.

View file

@ -23,6 +23,8 @@
rustup
glibc
gcc
jdk
maven
];
# Let Home Manager install and manage itself.

View file

@ -92,6 +92,8 @@
"linux-pam"
"pulseaudio"
;;"pipewire"
"libx11"
"xorg-server-xwayland"
"fprintd"
"wireplumber"
"virt-manager"

View file

@ -0,0 +1,79 @@
(define-module (home-packages audio)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix build-system meson)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages glib)
#:use-module (gnu packages audio)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages gtk)
#:use-module (gnu packages xiph)
#:use-module (gnu packages tbb)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnome)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages algebra)
#:use-module (gnu packages cpp)
#:use-module (gnu packages linux)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages cmake)
#:use-module (gnu packages maths)
#:use-module (gnu packages pkg-config))
(define-public easyeffects
(package
(name "easyeffects")
(version "7.0.1")
(arguments
(list
#:modules
'((guix build utils)
(guix build meson-build-system))
#:imported-modules
(append %meson-build-system-modules)
#:tests? #f))
(native-inputs (list gettext-minimal
itstool
desktop-file-utils
`(,glib "bin")
`(,gtk+ "bin")
pkg-config
cmake
appstream-glib
gtk))
(inputs (list zita-convolver
rnnoise
tbb
fftwf
lilv
fmt
rubberband
speexdsp
nlohmann-json
pipewire
libadwaita
libsigc++
libbs2b
libsndfile
libsamplerate
libebur128
libportal
gsl
speex
`(,util-linux "lib")))
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/wwmm/easyeffects/archive/refs/tags/v" version
".tar.gz"))
(sha256
(base32
"05j52fy51zjai7n0j23chydfgkfq9n82h2ih806z3b47zhk2h2j2"))))
(build-system meson-build-system)
(synopsis "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications")
(description "This package provides @code{easyeffects}, which is an audio application for use atop of @code{pipewire}
that allows effects that modify sound sources and sinks."
(home-page "https://github.com/wwmm/easyeffects")
(license license:gpl3+)))

View file

@ -1,56 +0,0 @@
(define-module (home-packages easyeffects)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages pkg-config)
#:use-module (guix build-system meson)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix utils))
(define-public easyeffects
(package
(name "easyeffects")
(version "6.3.0")
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
("pkg-config" ,pkg-config)
("gtk" ,gtk)))
(inputs
(append (specifications->packages (list "itstool"
"zita-convolver"
"rnnoise"
"tbb"
"pipewire"
"glib"
"libadwaita"
"libsigc++"
"lilv"
"libbs2b"
"libsndfile"
"fftwf"
"libebur128"
"libsamplerate"
"rubberband"
"speexdsp"
"nlohmann-json"
"fmt"
"gtk+:bin"
"desktop-file-utils"))))
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/wwmm/easyeffects/archive/refs/tags/v" version
".tar.gz"))
(sha256
(base32
"08l84qbv7jwnq1ffpf9sw013bshnkn18h487gpqhn5s4ha4gchkg"))))
(build-system meson-build-system)
(synopsis "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications")
(description "Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications")
(home-page "https://github.com/wwmm/easyeffects")
(license gpl3+)))

View file

@ -0,0 +1,65 @@
(define-module (home-packages mozillia)
#:use-module (gnu)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages bash)
#:use-module (gnu packages linux)
#:use-module (nonguix build-system binary)
#:use-module (guix build-system trivial)
#:use-module (nongnu packages mozilla)
#:export (firefox-wayland-new
firefox*))
(define firefox*
(package/inherit
firefox
(inputs
(modify-inputs
(package-inputs firefox)
(delete "pipewire")
(append pipewire)))))
(define firefox-wayland-new
(package
(inherit firefox*)
(name "firefox-wayland")
(native-inputs '())
(inputs
`(("bash" ,bash-minimal)
("pipewire" ,pipewire)
("firefox" ,firefox*)))
(build-system trivial-build-system)
(arguments
'(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let* ((bash (assoc-ref %build-inputs "bash"))
(firefox (assoc-ref %build-inputs "firefox"))
(pipewire (assoc-ref %build-inputs "pipewire"))
(out (assoc-ref %outputs "out"))
(exe (string-append out "/bin/firefox")))
(mkdir-p (dirname exe))
(call-with-output-file exe
(lambda (port)
;; NOTE: added "export LD_LIBRARY_PATH=pipewire"
;; maybe this can be done better with `wrap-programm'
(format port "#!~a \n
export LD_LIBRARY_PATH=~a \n
export MOZ_ENABLE_WAYLAND=1 \n
exec ~a $@\n"
(string-append bash "/bin/bash")
(string-append pipewire "/lib")
(string-append firefox "/bin/firefox"))))
(chmod exe #o555)
;; Provide the manual and .desktop file.
(copy-recursively (string-append firefox "/share")
(string-append out "/share"))
(substitute* (string-append
out "/share/applications/firefox.desktop")
((firefox) out))
#t))))))