summaryrefslogtreecommitdiff
path: root/sakura/packages/librewolf.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sakura/packages/librewolf.scm')
-rw-r--r--sakura/packages/librewolf.scm59
1 files changed, 59 insertions, 0 deletions
diff --git a/sakura/packages/librewolf.scm b/sakura/packages/librewolf.scm
new file mode 100644
index 0000000..5900071
--- /dev/null
+++ b/sakura/packages/librewolf.scm
@@ -0,0 +1,59 @@
+(define-module (sakura packages librewolf)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix build-system trivial)
+ #:use-module (gnu)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages librewolf)
+ #:use-module (sakura packages linux))
+
+(define-public librewolf-new
+ (package
+ (name "librewolf-new")
+ (source #f)
+ (version "0.1")
+ (synopsis "Simple wrapper for pipewire in librewolf")
+ (description "Simple wrapper for pipewire in librewolf")
+ (home-page "https://librewolf.net/")
+ (license license:mpl2.0)
+ (inputs
+ `(("bash" ,bash-minimal)
+ ("pipewire" ,pipewire-new)
+ ("librewolf" ,librewolf)))
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((bash (assoc-ref %build-inputs "bash"))
+ (librewolf (assoc-ref %build-inputs "librewolf"))
+ (pipewire (assoc-ref %build-inputs "pipewire"))
+ (out (assoc-ref %outputs "out"))
+ (exe (string-append out "/bin/librewolf")))
+ (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
+export MOZ_USE_XINPUT2=1 \n
+exec ~a $@\n"
+ (string-append bash "/bin/bash")
+ (string-append pipewire "/lib")
+ (string-append librewolf "/bin/librewolf"))))
+ (chmod exe #o555)
+
+ ;; Provide the manual and .desktop file.
+ (copy-recursively (string-append librewolf "/share")
+ (string-append out "/share"))
+ (substitute* (string-append
+ out "/share/applications/librewolf.desktop")
+ ((librewolf) out))
+ #t))))))
+