modules/ryan-packages/freedesktop.scm

526850ff3cc688a0e7cbc545fb0611f79e144692 · 5.8 KB · 135 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 build-system cmake)
8 #:use-module (guix build utils)
9 #:use-module (guix build glib-or-gtk-build-system)
10 #:use-module (guix packages)
11 #:use-module (guix git-download)
12 #:use-module (guix utils)
13 #:use-module (gnu packages)
14 #:use-module (gnu packages gl)
15 #:use-module (gnu packages linux)
16 #:use-module (gnu packages image)
17 #:use-module (gnu packages qt)
18 #:use-module (gnu packages cmake)
19 #:use-module (gnu packages pkg-config)
20 #:use-module (gnu packages freedesktop)
21 #:use-module (gnu packages xorg)
22 #:use-module (gnu packages man)
23 #:use-module (rosenthal packages wm)
24 #:use-module (gnu packages wm))
25
26 (define-public xdg-desktop-portal-wlr-new
27 (package
28 (inherit xdg-desktop-portal-wlr)
29 (version "0.7.0")
30 (source (origin
31 (method git-fetch)
32 (uri (git-reference
33 (url "https://github.com/emersion/xdg-desktop-portal-wlr")
34 (commit (string-append "v" version))))
35 (sha256
36 (base32
37 "1b3hpp3ybjgnnmnwsyb5bsnvz9q5nr3zz0j1alh02g24f68lf00k"))
38 (patches (search-patches "xdg-desktop-portal-wlr-harcoded-length.patch"))))
39 (native-inputs (modify-inputs (package-native-inputs xdg-desktop-portal-wlr)
40 (append wlroots)))))
41
42 (define-public xdg-desktop-portal-hyprland
43 (package
44 (name "xdg-desktop-portal-hyprland")
45 (version "0.5.0")
46 (source (origin
47 (method git-fetch)
48 (uri (git-reference
49 (url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
50 (commit (string-append "v" version))))
51 (file-name (git-file-name name version))
52 (sha256
53 (base32
54 "1dmgc0w4wjj9hwqg17wg529v8sbxr6czp9s319d5407jm780x40b"))))
55 (build-system meson-build-system)
56 (arguments
57 (list
58 #:modules
59 '((guix build utils)
60 (guix build meson-build-system)
61 ((guix build qt-build-system) #:prefix qt:))
62 #:imported-modules
63 (append %meson-build-system-modules
64 %qt-build-system-modules)
65 #:tests? #f
66 #:configure-flags #~(list "-Dsystemd=disabled")
67 #:phases
68 ;; After building the portal, we need to build the share selector using qt
69 #~(modify-phases %standard-phases
70 (add-after 'install 'chdir
71 (lambda _ (chdir "../source/hyprland-share-picker/")))
72 (add-after 'chdir 'check-setup
73 (assoc-ref qt:%standard-phases 'check-setup))
74 (add-after 'check-setup 'qt-build
75 (lambda* (#:key inputs outputs #:allow-other-keys)
76 ((assoc-ref qt:%standard-phases 'build)
77 #:inputs inputs
78 #:outputs outputs
79 #:configure-flags '()
80 #:qtbase #$(this-package-native-input "qtbase-5"))))
81 (add-after 'qt-build 'qt-install
82 (lambda* (#:key inputs outputs #:allow-other-keys)
83 (let ((share-picker (string-append (assoc-ref outputs "out")
84 "/bin")))
85 (install-file "build/hyprland-share-picker" share-picker)
86 #t)))
87 (add-after 'qt-install 'qt-wrap
88 (assoc-ref qt:%standard-phases 'qt-wrap))
89 (add-after 'qt-wrap 'dep-wrap
90 (lambda* (#:key inputs #:allow-other-keys)
91 (let ((hyprland-share-picker (string-append #$output "/bin/hyprland-share-picker")))
92 (wrap-program hyprland-share-picker
93 `("PATH" suffix
94 ,(map (lambda (program)
95 (dirname (search-input-file
96 inputs (string-append "/bin/" program))))
97 '("slurp"))))))))))
98 (native-inputs (list cmake pkg-config qtbase-5))
99 (inputs (list elogind hyprland hyprland-protocols slurp pipewire wayland-protocols wayland libinih mesa qtwayland-5 `(,util-linux "lib")))
100 (home-page "")
101 (synopsis "test")
102 (description "test")
103 (license license:bsd-3)))
104
105 (define-public wl-mirror
106 (package
107 (name "wl-mirror")
108 (version "0.13.2")
109 (source (origin
110 (method git-fetch)
111 (uri (git-reference
112 (url "https://github.com/Ferdi265/wl-mirror")
113 (commit (string-append "v" version))
114 (recursive? #t)))
115 (file-name (git-file-name name version))
116 (sha256
117 (base32
118 "0vkd73x5r2585s3w1ckvslc2mq9qbzrm5xkwg8gpy9ydaxhn8hmp"))))
119 (inputs (list wayland egl-wayland mesa))
120 (native-inputs (list pkg-config scdoc wayland-protocols))
121 (build-system cmake-build-system)
122 (arguments (list
123 #:tests? #f
124 #:phases
125 #~(modify-phases %standard-phases
126 (add-before 'configure 'touch
127 (lambda _
128 (invoke "touch" "proto/wayland-protocols/.git")
129 (invoke "touch" "proto/wlr-protocols/.git"))))))
130 (home-page "bleh")
131 (synopsis "mirror displays")
132 (description "mirror displays")
133 (license license:expat)))
134
135 wl-mirror