modules/ryan-packages/freedesktop.scm

193d559a191e72ab09b944f596ceb037e5b8bea8 · 3.8 KB · 88 lines raw

1 (define-module (ryan-packages freedesktop)
2 #:use-module (guix download)
3 #:use-module ((guix licenses) #:prefix license:)
4 #:use-module (guix gexp)
5 #:use-module (guix build-system meson)
6 #:use-module (guix build-system qt)
7 #:use-module (guix packages)
8 #:use-module (guix git-download)
9 #:use-module (guix utils)
10 #:use-module (gnu packages)
11 #:use-module (gnu packages gl)
12 #:use-module (gnu packages linux)
13 #:use-module (gnu packages qt)
14 #:use-module (gnu packages cmake)
15 #:use-module (gnu packages pkg-config)
16 #:use-module (gnu packages freedesktop)
17 #:use-module (rosenthal packages wm)
18 #:use-module (gnu packages wm))
19
20 (define-public xdg-desktop-portal-wlr-new
21 (package
22 (inherit xdg-desktop-portal-wlr)
23 (version "0.7.0")
24 (source (origin
25 (method git-fetch)
26 (uri (git-reference
27 (url "https://github.com/emersion/xdg-desktop-portal-wlr")
28 (commit (string-append "v" version))))
29 (sha256
30 (base32
31 "1b3hpp3ybjgnnmnwsyb5bsnvz9q5nr3zz0j1alh02g24f68lf00k"))
32 (patches (search-patches "xdg-desktop-portal-wlr-harcoded-length.patch"))))
33 (native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr)
34 (append wlroots)))))
35
36 (define-public xdg-desktop-portal-hyprland
37 (package
38 (name "xdg-desktop-portal-hyprland")
39 (version "0.4.0")
40 (source (origin
41 (method git-fetch)
42 (uri (git-reference
43 (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
44 (commit (string-append "v" version))))
45 (file-name (git-file-name name version))
46 (sha256
47 (base32
48 "1dcglmx02j73qbmw9qsacamn8byakyzwknpqjnhsyphixb4crrdg"))))
49 (build-system meson-build-system)
50 (arguments
51 (list
52 #:modules
53 '((guix build utils)
54 (guix build meson-build-system)
55 ((guix build qt-build-system) #:prefix qt:))
56 #:imported-modules
57 (append %meson-build-system-modules
58 %qt-build-system-modules)
59 #:tests? #f
60 #:configure-flags #~(list "-Dsystemd=disabled")
61 #:phases
62 ;; After building the portal, we need to build the share selector using qt
63 #~(modify-phases %standard-phases
64 (add-after 'install 'chdir
65 (lambda _ (chdir "../source/hyprland-share-picker/")))
66 (add-after 'chdir 'check-setup
67 (assoc-ref qt:%standard-phases 'check-setup))
68 (add-after 'check-setup 'qt-build-new
69 (lambda* (#:key inputs outputs #:allow-other-keys)
70 ((assoc-ref qt:%standard-phases 'build)
71 #:inputs inputs
72 #:outputs outputs
73 #:configure-flags '()
74 ;#:qtbase (let ((module (resolve-interface '(gnu packages qt))))(module-ref module 'qtbase))))) <--- This results in no code for module (gnu packages qt)
75 #:qtbase #$(this-package-native-input "qtbase"))))
76 ;)))
77 (add-after 'qt-build 'qt-install
78 (assoc-ref qt:%standard-phases 'install))
79 (add-after 'qt-install 'qt-wrap
80 (assoc-ref qt:%standard-phases 'qt-wrap)))))
81 (native-inputs (list cmake pkg-config qtbase))
82 (inputs (list elogind hyprland hyprland-protocols pipewire wayland-protocols wayland libinih mesa qtwayland `(,util-linux "lib")))
83 (home-page "")
84 (synopsis "test")
85 (description "test")
86 (license license:bsd-3)))
87
88 xdg-desktop-portal-hyprland