(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 and (substitute* (find-files "src" "\\.hpp$") (("#pragma once" pragma) (string-append pragma "\n#include " "\n#include "))) ))))) (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)))