summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2023-09-25 14:42:43 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2023-09-25 14:42:43 -0400
commitc12f78564d0d7f98bd0440ea743cdd66449d3366 (patch)
tree96c1546613bdee1bd2364275ce713f76724ad6ed
parent7dfd35ba5b242373a48a3ca346b150d151c9058b (diff)
added initial, but broken, codebroken-new-portal
-rw-r--r--modules/ryan-packages/freedesktop.scm80
1 files changed, 78 insertions, 2 deletions
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 @@
18 #:use-module (gnu packages cmake) 18 #:use-module (gnu packages cmake)
19 #:use-module (gnu packages pkg-config) 19 #:use-module (gnu packages pkg-config)
20 #:use-module (gnu packages freedesktop) 20 #:use-module (gnu packages freedesktop)
21 #:use-module (gnu packages bash)
21 #:use-module (gnu packages xorg) 22 #:use-module (gnu packages xorg)
23 #:use-module (gnu packages glib)
22 #:use-module (gnu packages man) 24 #:use-module (gnu packages man)
23 #:use-module (rosenthal packages wm) 25 #:use-module (rosenthal packages wm)
24 #:use-module (gnu packages wm)) 26 #:use-module (gnu packages wm))
@@ -39,7 +41,7 @@
39 (native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr) 41 (native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr)
40 (append wlroots))))) 42 (append wlroots)))))
41 43
42(define-public xdg-desktop-portal-hyprland 44(define xdg-desktop-portal-hyprland-old-original
43 (package 45 (package
44 (name "xdg-desktop-portal-hyprland") 46 (name "xdg-desktop-portal-hyprland")
45 (version "0.5.0") 47 (version "0.5.0")
@@ -132,4 +134,78 @@
132 (description "mirror displays") 134 (description "mirror displays")
133 (license license:expat))) 135 (license license:expat)))
134 136
135wl-mirror 137(define-public xdg-desktop-portal-hyprland
138 (package
139 (name "xdg-desktop-portal-hyprland")
140 (version "1.1.0")
141 (source (origin
142 (method git-fetch)
143 (uri (git-reference
144 (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
145 (commit (string-append "v" version))))
146 (file-name (git-file-name name version))
147 (sha256
148 (base32
149 "05gcdg3fw7plc9fri6rpq9la1xjij93jqkqmq57mrqjgwg3jlmrb"))))
150 (build-system meson-build-system)
151 (arguments
152 (list #:imported-modules
153 (append %meson-build-system-modules
154 %qt-build-system-modules)
155 #:modules
156 '((guix build utils)
157 (guix build meson-build-system)
158 ((guix build qt-build-system) #:prefix qt:))
159 #:tests? #f ;No tests
160 #:phases
161 #~(modify-phases %standard-phases
162 (add-after 'unpack 'fix-path
163 (lambda* (#:key inputs #:allow-other-keys)
164 (substitute* (find-files "." "\\.cp?*$")
165 (("/bin/sh") "sh")
166 (("\\<(sh|grim|slurp)\\>" _ cmd)
167 (search-input-file inputs (string-append "/bin/" cmd)))
168 (("\"(hyprland-share-picker)\"" _ cmd)
169 (string-append "\"" #$output "/bin/" cmd "\"")))))
170 ;; After building the portal, we need to build the share selector
171 ;; using qt
172 (add-after 'install 'chdir
173 (lambda _
174 (chdir "../source/hyprland-share-picker/")))
175 (add-after 'chdir 'qt-build
176 (lambda* (#:key (make-flags '()) (parallel-build? #t)
177 #:allow-other-keys)
178 ((assoc-ref qt:%standard-phases 'build)
179 #:make-flags make-flags
180 #:parallel-build? parallel-build?)))
181 (add-after 'qt-build 'install-hyprland-share-picker
182 (lambda _
183 (install-file "build/hyprland-share-picker"
184 (string-append #$output "/bin"))))
185 (add-after 'install-hyprland-share-picker 'qt-wrap
186 (assoc-ref qt:%standard-phases 'qt-wrap)))))
187 (native-inputs (list cmake-minimal pkg-config))
188 (inputs
189 (list bash-minimal
190 basu
191 grim
192 hyprland-protocols
193 libinih
194 mesa
195 pipewire
196 sdbus-c++
197 qtbase-5
198 slurp
199 `(,util-linux "lib")
200 wayland
201 wayland-protocols))
202 (home-page "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
203 (synopsis "XDG Desktop Portal backend for Hyprland")
204 (description
205 "This package provides @code{xdg-desktop-portal-hyprland}, which extends
206@code{xdg-desktop-portal-wlr} for Hyprland with support for
207@code{xdg-desktop-portal} screenshot and casting interfaces, while adding a few
208extra portals specific to Hyprland, mostly for window sharing.")
209 (license license:expat)))
210
211xdg-desktop-portal-hyprland