Compare

a01f7ce1b0e79ade2d5871aa29170af2925de542broken-new-portal · 1 commits

merge base 7dfd35ba5b24…

Changed files

Commits

HashSubjectAuthorDate
c12f7856 added initial, but broken, code Ryan Schanzenbacher
diff --git a/modules/ryan-packages/freedesktop.scm b/modules/ryan-packages/freedesktop.scm
index 7fb0652..69519cb 100644
--- a/modules/ryan-packages/freedesktop.scm
+++ b/modules/ryan-packages/freedesktop.scm
@@ -18,7 +18,9 @@
#:use-module (gnu packages cmake)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages xorg)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages man)
#:use-module (rosenthal packages wm)
#:use-module (gnu packages wm))
@@ -39,7 +41,7 @@
(native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr)
(append wlroots)))))
-(define-public xdg-desktop-portal-hyprland
+(define xdg-desktop-portal-hyprland-old-original
(package
(name "xdg-desktop-portal-hyprland")
(version "0.5.0")
@@ -132,4 +134,78 @@
(description "mirror displays")
(license license:expat)))
-wl-mirror
+(define-public xdg-desktop-portal-hyprland
+ (package
+ (name "xdg-desktop-portal-hyprland")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05gcdg3fw7plc9fri6rpq9la1xjij93jqkqmq57mrqjgwg3jlmrb"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:imported-modules
+ (append %meson-build-system-modules
+ %qt-build-system-modules)
+ #:modules
+ '((guix build utils)
+ (guix build meson-build-system)
+ ((guix build qt-build-system) #:prefix qt:))
+ #:tests? #f ;No tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "." "\\.cp?*$")
+ (("/bin/sh") "sh")
+ (("\\<(sh|grim|slurp)\\>" _ cmd)
+ (search-input-file inputs (string-append "/bin/" cmd)))
+ (("\"(hyprland-share-picker)\"" _ cmd)
+ (string-append "\"" #$output "/bin/" cmd "\"")))))
+ ;; After building the portal, we need to build the share selector
+ ;; using qt
+ (add-after 'install 'chdir
+ (lambda _
+ (chdir "../source/hyprland-share-picker/")))
+ (add-after 'chdir 'qt-build
+ (lambda* (#:key (make-flags '()) (parallel-build? #t)
+ #:allow-other-keys)
+ ((assoc-ref qt:%standard-phases 'build)
+ #:make-flags make-flags
+ #:parallel-build? parallel-build?)))
+ (add-after 'qt-build 'install-hyprland-share-picker
+ (lambda _
+ (install-file "build/hyprland-share-picker"
+ (string-append #$output "/bin"))))
+ (add-after 'install-hyprland-share-picker 'qt-wrap
+ (assoc-ref qt:%standard-phases 'qt-wrap)))))
+ (native-inputs (list cmake-minimal pkg-config))
+ (inputs
+ (list bash-minimal
+ basu
+ grim
+ hyprland-protocols
+ libinih
+ mesa
+ pipewire
+ sdbus-c++
+ qtbase-5
+ slurp
+ `(,util-linux "lib")
+ wayland
+ wayland-protocols))
+ (home-page "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
+ (synopsis "XDG Desktop Portal backend for Hyprland")
+ (description
+ "This package provides @code{xdg-desktop-portal-hyprland}, which extends
+@code{xdg-desktop-portal-wlr} for Hyprland with support for
+@code{xdg-desktop-portal} screenshot and casting interfaces, while adding a few
+extra portals specific to Hyprland, mostly for window sharing.")
+ (license license:expat)))
+
+xdg-desktop-portal-hyprland