summaryrefslogtreecommitdiff
path: root/modules/freya/packages/wm.scm
blob: 5c992126605327bc0f3534940be1c5cb0bdb6ac7 (plain)
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
(define-module (freya packages wm)
               #:use-module ((guix licenses) #:prefix license:)
               #:use-module (gnu packages)
               #:use-module (gnu packages gl)
               #:use-module (gnu packages wm)
               #:use-module (gnu packages stb)
               #:use-module (gnu packages gcc)
               #:use-module (gnu packages sdl)
               #:use-module (gnu packages xorg)
               #:use-module (gnu packages xdisorg)
               #:use-module (gnu packages maths)
               #:use-module (gnu packages image)
               #:use-module (gnu packages cmake)
               #:use-module (gnu packages linux)
               #:use-module (gnu packages vulkan)
               #:use-module (gnu packages python)
               #:use-module (gnu packages pciutils)
               #:use-module (gnu packages benchmark)
               #:use-module (gnu packages pkg-config)
               #:use-module (gnu packages freedesktop)
               #:use-module (gnu packages version-control)
               #:use-module (guix download)
               #:use-module (guix packages)
               #:use-module (guix gexp)
               #:use-module (guix git-download)
               #:use-module (guix build utils)
               #:use-module (guix build-system meson)
               #:use-module (guix utils))


(define-public swaylock-effects-new
  (package
    (inherit swaylock-effects)
    (name "swaylock-effects-new")
    (version "1.7.0.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://github.com/jirutka/swaylock-effects")
                     (commit (string-append "v" version))))
              (sha256
                (base32
                  "0cgpbzdpxj6bbpa8jwql1snghj21mhryyvj6sk46g66lqvwlrqbj"))))))


(define-public waybar-new
  (package
    (inherit waybar)
    (name "waybar-new")
    (version "0.11.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/Alexays/Waybar")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1bw6d3bf8rm4mgrbcprxxljfxbyabbj2lwabk2z19r8lhfz38myy"))))
    (arguments
      (list
        #:configure-flags #~(list "--wrap-mode=nodownload" "-Dexperimental=true")))))


(define-public vkroots
  (let ((commit "d5ef31abc7cb5c69aee4bcb67b10dd543c1ff7ac"))
  (package
    (name "vkroots")
    (version (git-version "" "0" commit))
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/misyltoad/vkroots")
               (commit commit)))
        (sha256
          (base32
            "0g2mh8l0xzxzr4yjyafzv76n7jk9043dcbf5mpqwpwmjx88m5nc0"))
        (file-name (git-file-name name version))))
    (arguments (list
      #:phases #~(modify-phases %standard-phases
        (add-after 'unpack 'patch-vulkan
          (lambda _
            (substitute* "gen/make_vkroots"
              (("\\.\\.") (getcwd)))))
        (add-before 'install 'gen-vkroots
          (lambda _
            (invoke "python3"
                    "../source/gen/make_vkroots"
                    "-x"
                    (string-append
                     #$(this-package-native-input "vulkan-headers")
                     "/share/vulkan/registry/vk.xml")))))))
    (build-system meson-build-system)
    (native-inputs (list python vulkan-headers))
    (home-page "https://github.com/misyltoad/vkroots")
    (description "A stupid simple method of making Vulkan layers, at home! ")
    (synopsis "A stupid simple method of making Vulkan layers, at home! ")
    (license license:expat))))


(define-public libliftoff-0.4
  (package
    (inherit libliftoff)
    (name "libliftoff")
    (version "0.4.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://gitlab.freedesktop.org/emersion/libliftoff")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1ikjp638d655ycaqkdnzhb12d29kkbb3a46lqhbhsfc8vsqj3z1l"))))))


(define reshade-for-gamescope
  (let ((commit "4245743a8c41abbe3dc73980c1810fe449359bf1"))
    (origin
      (method git-fetch)
      (uri (git-reference
            (url "https://github.com/Joshua-Ashton/reshade")
            (commit commit)))
      (file-name (git-file-name "reshade" commit))
      (sha256
       (base32 "1bb5392dfiri8nrxvck1w2jxva8m9xzrgi16rvnvg96l493a538y")))))


(define-public gamescope
  (package
    (name "gamescope")
    (version "3.14.2")
    (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/ValveSoftware/gamescope")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0x7gh1rr2ismqfkaa4wm7025acjpgmims41iwzdcps5pg8nxmmhh"))))
    (build-system meson-build-system)
    (arguments
      (list #:configure-flags #~(list "-Dpipewire=enabled"
                                      "-Denable_openvr_support=false"
                                      "-Dforce_fallback_for=[]"
                                      (string-append "-Dc_args=-DHWDATA_PNP_IDS=\""
                                                     #$(this-package-native-input "hwdata")
                                                     "/share/hwdata/pnp.ids\""))
            #:tests? #f
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'patch-deps
                  (lambda _
                    ; copy reshade
                    (delete-file-recursively "src/reshade")
                    (copy-recursively #$reshade-for-gamescope "src/reshade")
                    ; path /usr
                    (substitute* "src/reshade_effect_manager.cpp"
                       (("/usr") #$output))
                    ; path meson.build
                    (substitute* "src/meson.build"
                      ;; patch stb
                      (("dependency\\('stb'\\)")
                       (format #f "declare_dependency(include_directories: ['~a'])"
                               (string-join
                                '#$(map (lambda (label) (this-package-native-input label))
                                        (list "stb-image"
                                              "stb-image-resize"
                                              "stb-image-write"))
                                "','")))
                      ;; patch libdisplay-info
                      (("< 0.2.0")
                       (string-append "<= " #$(package-version (this-package-input "libdisplay-info"))))
                      ;(("reshade/") (string-append #$reshade-for-gamescope "/"))
                      (("../thirdparty/SPIRV-Headers") #$(this-package-native-input "spirv-headers")))
                    ;; include <limits> and <cstdint>
                    (substitute* (find-files "src" "\\.hpp$")
                      (("#pragma once" pragma)
                       (string-append pragma
                                      "\n#include <limits>"
                                      "\n#include <cstdint>")))
                     )))))
    (native-inputs (list gcc-13
                         benchmark
                         glslang
                         hwdata
                         pkg-config
                         stb-image
                         stb-image-resize
                         stb-image-write
                         spirv-headers
                         vkroots
                         vulkan-headers
                         wayland-protocols))
    (inputs (list gcc-13
                  glm
                  libavif
                  libcap
                  libdisplay-info
                  libdrm
                  libinput
                  libliftoff-0.4
                  libx11
                  libxcomposite
                  libxcursor
                  libxdamage
                  libxext
                  libxkbcommon
                  libxmu
                  libxrender
                  libxres
                  libxt
                  libxtst
                  pipewire
                  sdl2
                  vulkan-loader
                  wayland
                  wlroots))
    (home-page "https://github.com/ValveSoftware/gamescope")
    (description "SteamOS session compositing window manager")
    (synopsis "SteamOS session compositing window manager")
    (license license:bsd-2)))