summaryrefslogtreecommitdiff
path: root/modules/freya/packages/mozillia.scm
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-06-21 22:52:21 -0400
committerFreya Murphy <freya@freyacat.org>2024-06-21 22:52:21 -0400
commitcf5d8d92f1904511006a89970349dbf723ae1732 (patch)
tree2deb7af8e9031a502b6b7f1c263198e4d6b93f9f /modules/freya/packages/mozillia.scm
parentupdate guixstrap (diff)
downloaddotfiles-guix-cf5d8d92f1904511006a89970349dbf723ae1732.tar.gz
dotfiles-guix-cf5d8d92f1904511006a89970349dbf723ae1732.tar.bz2
dotfiles-guix-cf5d8d92f1904511006a89970349dbf723ae1732.zip
update things
Diffstat (limited to 'modules/freya/packages/mozillia.scm')
-rw-r--r--modules/freya/packages/mozillia.scm59
1 files changed, 59 insertions, 0 deletions
diff --git a/modules/freya/packages/mozillia.scm b/modules/freya/packages/mozillia.scm
new file mode 100644
index 0000000..57c9b54
--- /dev/null
+++ b/modules/freya/packages/mozillia.scm
@@ -0,0 +1,59 @@
+(define-module (freya packages mozillia)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages linux)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix build-system trivial)
+ #:use-module (nonguix build-system binary)
+ #:use-module (nongnu packages mozilla))
+
+(define-public firefox-wayland-new
+ (package
+ (name "firefox-wayland-new")
+ (source #f)
+ (version "0.1")
+ (synopsis "Simple wrapper for pipewire in firefox")
+ (description "Simple wrapper for pipewire in firefox")
+ (home-page "http://mozilla.org/")
+ (license license:mpl2.0)
+ (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
+export MOZ_USE_XINPUT2=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))))))
+