~whereiseveryone/guixrus

guixrus/guixrus/packages/wayfire.scm -rw-r--r-- 11.7 KiB
f6f32b39jgart roper: add license 12 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2020 pkill9 <pkill9@runbox.com>
;;; Copyright © 2021 florhizome <florhizome@posteo.net>
;;; Copyright © 2021 (unmatched parenthesis <paren@disroot.org>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages wayfire)
  #:use-module (guix build utils)
  #:use-module (guix build-system meson)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages build-tools)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages image)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages maths)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages vulkan)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages check)
  #:use-module (gnu packages cmake)
  #:use-module (guixrus packages freedesktop))

(define-public wf-config
  (let ((commit "e42a3870fb194842a505ad5a9671be1aebda0b0b")
        (version "0.8.0")
        (revision "0"))
    (package
     (name "wf-config")
     (version (git-version version revision commit))
     (source
      (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/WayfireWM/wf-config.git")
         (commit commit)))
       (sha256
        (base32 "0n6i3hizbqixxjh33950ya8avwqil5k94jbgff1pimcbh9ahpgrr"))))
     (build-system meson-build-system)
     (propagated-inputs
      (list glm libevdev libxml2))
     (native-inputs
      (list pkg-config cmake))
     (inputs
      (list wlroots-for-wayfire doctest))
     (home-page "https://wayfire.org")
     (synopsis "A library for managing configuration files for wayfire.")
     (description "@code{wf-config} is wayfire's native configuration backend.")
     (license license:expat))))

;;;TODO make tests work (add doctest + cmake to build them)
(define-public wayfire
  (let ((commit "6720f6a6e902d2a100158b31f611cddb1a2568bd")
        (version "0.8.0")
        (revision "0"))
    (package
      (name "wayfire")
      (version (git-version version revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/WayfireWM/wayfire.git")
           (commit commit)
           ;;for wf-utils, wf-touch, wf-config and wlroots are built separately
           (recursive? #t)))
         (sha256
          (base32 "12lc5sl93qy2iqp1jbwc8s2krbjs7il04dqz2j5gp4d8lpkhyc67"))))
      (build-system meson-build-system)
      (propagated-inputs
       (list wf-config pango wlroots-for-wayfire))
      (inputs
       (list cairo elogind eudev freetype glm
             libdrm libevdev libinput libjpeg-turbo libpng
             pixman libxkbcommon libxml2 mesa seatd wayland))
      (native-inputs
       (list bash pkg-config wayland-protocols))
      (native-search-paths
       (list
        (search-path-specification
         (variable "WAYFIRE_PLUGINS_DIRECTORY")
         (separator #f)
         (files '("lib/wayfire/plugins")))
        (search-path-specification
         (variable "WAYFIRE_PLUGINS_XML_DIRECTORY")
         (separator #f)
         (files '("$XDG_DATA_DIRS/share/wayfire/metadata")))))
      (search-paths native-search-paths)
      (arguments
       `(#:configure-flags
         (list
          "-Duse_system_wfconfig=disabled"
          "-Dwlroots:logind-provider=elogind")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-shell-path
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "src/meson.build"
                 (("/bin/sh")
                  (string-append (assoc-ref inputs "bash")
                                 "/bin/bash")))
               (substitute* "src/core/core.cpp"
                 (("/bin/sh")
                  (string-append (assoc-ref inputs "bash")
                                 "/bin/bash"))))))))
      (home-page "https://wayfire.org")
      (synopsis "Wayland compositor")
      (description "Wayfire is a wayland compositor based on wlroots.
It aims to create a customizable, extendable and lightweight
 environment without sacrificing its appearance.")
      (license license:expat))))

(define-public wayfire-plugins-extra
  (let ((commit "21b598460fd8c6c1e8e6ff70067df60c9bc9601f")
        (version "0.8.0")
        (revision "0"))
    (package
      (name "wayfire-plugins-extra")
      (version (git-version version revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/WayfireWM/wayfire-plugins-extra")
           (commit commit)
           (recursive? #t)))
         (sha256
          (base32 "167iiypiqzc6sbkckwxmvkhx9w68dhyiwgyi50dg5il11lpmca0d"))))
      (build-system meson-build-system)
      (arguments
       `(#:glib-or-gtk? #t
         #:configure-flags
         (list
          "-Denable_wayfire_shadows=true")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'alter-target-dirs
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out")))
                 ;; We have to patch paths of the standard plugins and those
                 ;; found in ./subprojects/projectname/meson.build
                 (substitute*
                     (list
                      "./metadata/meson.build"
                      "./subprojects/dbus/meson.build"
                      "./subprojects/windecor/meson.build"
                      "./subprojects/wayfire-shadows/meson.build")
                   (("wayfire\\.get_variable\\(pkgconfig: 'metadatadir'\\)")
                    (string-append "'" out "/share/wayfire/metadata'")))
                 (substitute*
                     (list
                      "subprojects/windecor/meson.build"
                      "subprojects/wayfire-shadows/meson.build")
                   (("wayfire\\.get_variable\\( pkgconfig: 'metadatadir' \\)")
                    (string-append "'" out "/share/wayfire/metadata'")))
                 (substitute* "subprojects/dbus/meson.build"
                   (("wayfire\\.get_variable\\(pkgconfig: 'plugindir'\\)")
                    (string-append "'" out "/lib/wayfire'"))) #t))))))
      (native-inputs
        (list gobject-introspection pkg-config))
      (inputs
        (list gtkmm-3 librsvg pango wayfire wf-config
         wlroots-for-wayfire))
      (native-search-paths (package-native-search-paths wayfire))
      (search-paths  native-search-paths)
      (home-page "https://wayfire.org")
      (synopsis "Additional plugins for wayfire")
      (description "@code{wayfire-plugins-extra} contains plugins
 that have external dependencies, debugging purposes or otherwise
 will not be included with wayfire core.")
      (license license:expat))))

(define-public wf-shell
  (let ((commit "b60b02a30179609ff553537b5cc0d346cc489408")
        (version "0.8.0")
        (revision "0"))
    (package
      (name "wf-shell")
      (version (git-version version revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/WayfireWM/wf-shell.git")
           (commit commit)
           (recursive? #t)))
         (sha256
          (base32 "0rsrm5d07yk4yvh8p4ipsgx2rhvl1qpxiqc886hf9ry3s43dzxg1"))))
      (build-system meson-build-system)
      (native-inputs
       (list
        gobject-introspection
        pkg-config))
      (inputs
       (list alsa-lib glib gtk-layer-shell gtkmm-3 libdrm
        pulseaudio wayfire wayland wf-config))
      (native-search-paths (package-native-search-paths wayfire))
      (search-paths  native-search-paths)
      (home-page "https://wayfire.org")
      (synopsis "GTK-based panel for wayfire")
      (description "@code{wf-shell} contains various components
 needed to build a fully functional DE based around wayfire.
 Currently it contains a GTK-based panel, a dock and a background
 wallpaper client.")
      (license license:expat))))

(define-public wcm
  (let ((commit "2b139dc76a01f14340b9daee9ea021330f625460")
        (version "0.8.0")
        (revision "1"))
    (package
      (name "wcm")
      (version (git-version version revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/WayfireWM/wcm.git")
           (commit commit)))
         (sha256
          (base32 "0ln1432igiik86d1hv7sqrrmadpcxvxgy0b60zrbv2bnwz41vs9r"))))
      (build-system meson-build-system)
      (arguments `(#:configure-flags '("-Denable_wdisplays=false")))
      (native-inputs (list pkg-config `(,glib "bin") wayland-protocols))
      (inputs (list wf-config wayland wayfire gtk+))
      (propagated-inputs (list wlroots-for-wayfire))
      (home-page "https://wayfire.org")
      (synopsis "Wayfire Config Manager")
      (description "Wayfire Config Manager is a Gtk3 application to
configure wayfire. It writes the config file that wayfire reads to
update option values.")
      (license license:expat))))


(define-public swayfire
  (let ((commit "8c2cda501a4c801406e6361f74c61e0e21ed99d3")
        (revision "0"))
    (package
      (name "swayfire")
      (version "0.1")
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/Javyre/swayfire")
           (commit commit)))
         (sha256
          (base32 "0gjjn7k1qqa8f0fsyyk4qabc3p2w39fx4zcigfsya85xgn587shl"))))
      (build-system meson-build-system)
      (arguments
       `(#:meson ,meson-0.59
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'alter-target-dirs
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out")))
                 (substitute* "./metadata/meson.build"
                   (("wayfire\\.get_variable\\(pkgconfig: 'metadatadir'\\)")
                    (string-append "'" out "/share/wayfire/metadata'")))
                 (substitute* "./src/meson.build"
                   (("wayfire\\.get_variable\\(pkgconfig: 'plugindir'\\)")
                    (string-append "'" out "/lib/wayfire'")))))))))
      (native-inputs
       (list pkg-config))
      (inputs
       (list wlroots-for-wayfire wf-config libxml2 wayland wayfire cairo))
      (native-search-paths (package-native-search-paths wayfire))
      (search-paths  native-search-paths)
      (synopsis "Tiling window manager plugin for wayfire")
      (description "Swayfire is a tiling window manager for Wayfire, inspired by
i3/sway.  It aims to improve upon sway/i3wm features as a plugin for the Wayfire
compositor.")
      (home-page "https://github.com/Javyre/swayfire")
      (license license:gpl3+))))