From: dan <i@dan.games>
To: 70493@debbugs.gnu.org
Cc: john.kehayias@protonmail.com
Subject: [bug#70493] [PATCH 4/4] gnu: Add gamescope.
Date: Sun, 21 Apr 2024 16:29:32 +0800 [thread overview]
Message-ID: <0ca550e23940a3918fd7f42e9383ee188cbea9b5.1713687359.git.i@dan.games> (raw)
In-Reply-To: <cover.1713687359.git.i@dan.games>
* gnu/packages/wm.scm (%gamescope-version): New variable.
(reshade-for-gamescope): New variable.
(gamescope): New variable.
Change-Id: If86bc6127144854189f8fa66415f32bc80a26d6b
---
gnu/packages/wm.scm | 110 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 2eecc0ed2a..8d816e2e28 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -70,6 +70,7 @@
;;; Copyright © 2024 Ahmad Draidi <a.r.draidi@redscript.org>
;;; Copyright © 2024 chris <chris@bumblehead.com>
;;; Copyright © 2024 Erik Eduardo Alonso Hernández <erik@erikeduardo.xyz>
+;;; Copyright © 2024 dan <i@dan.games>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -105,6 +106,7 @@ (define-module (gnu packages wm)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages benchmark)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -142,6 +144,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages logging)
#:use-module (gnu packages lua)
#:use-module (gnu packages man)
+ #:use-module (gnu packages maths)
#:use-module (gnu packages mpd)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages music)
@@ -155,12 +158,15 @@ (define-module (gnu packages wm)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages sdl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages stb)
#:use-module (gnu packages suckless)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages textutils)
#:use-module (gnu packages time)
+ #:use-module (gnu packages vulkan)
#:use-module (gnu packages web)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
@@ -3856,3 +3862,107 @@ (define-public yambar-wayland
for short) for X11 and Wayland, that goes to great lengths to be both CPU and
battery efficient---polling is only done when absolutely necessary.")
(license license:expat)))
+
+(define %gamescope-version "3.14.2")
+
+(define reshade-for-gamescope
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Joshua-Ashton/reshade")
+ (commit "9fdbea6892f9959fdc18095d035976c574b268b7")))
+ (file-name (git-file-name "reshade-for-gamescope" %gamescope-version))
+ (sha256
+ (base32 "1par0ay973l0bvlz0fsg3v1fxgrnn888yc0hx3ikkyc0jbbf59bg"))))
+
+(define-public gamescope
+ (package
+ (name "gamescope")
+ (version %gamescope-version)
+ (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\""))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-deps
+ (lambda _
+ (substitute* "src/reshade_effect_manager.cpp"
+ (("/usr") #$output))
+ (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"))))))))
+ (inputs
+ (list glm
+ libavif-1.0
+ libcap
+ libdisplay-info
+ libdrm
+ libinput
+ libliftoff
+ libx11
+ libxcomposite
+ libxcursor
+ libxdamage
+ libxext
+ libxkbcommon
+ libxmu
+ libxrender
+ libxres
+ libxt
+ libxtst
+ pipewire
+ sdl2
+ vulkan-loader
+ wayland
+ wlroots))
+ (native-inputs
+ (list benchmark
+ ;; Lazily resolve the gcc-toolchain-12 to avoid a circular dependency.
+ (module-ref (resolve-interface '(gnu packages commencement))
+ 'gcc-toolchain-12)
+ glslang
+ `(,hwdata "pnp")
+ pkg-config
+ stb-image
+ stb-image-resize
+ stb-image-write
+ spirv-headers
+ vkroots
+ vulkan-headers
+ wayland-protocols))
+ (home-page "https://github.com/ValveSoftware/gamescope")
+ (synopsis "Micro-compositor for running games")
+ (description
+ "gamescope is a micro-compositor for running games. Its goal is to
+provide an isolated compositor that is tailored towards gaming and supports
+many gaming-centric features such as:
+@itemize
+@item Spoofing resolutions.
+@item Upscaling.
+@item Limiting framerates.
+@end itemize")
+ (license license:bsd-2)))
--
2.41.0
prev parent reply other threads:[~2024-04-21 8:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 8:19 [bug#70493] [PATCH 0/4] gnu: Add gamescope dan
2024-04-21 8:29 ` [bug#70493] [PATCH 1/4] gnu: Add libliftoff dan
2024-04-21 8:29 ` [bug#70493] [PATCH 2/4] gnu: Add vkroots dan
2024-04-21 8:29 ` [bug#70493] [PATCH 3/4] gnu: Add libavif-1.0 dan
2024-04-21 8:29 ` dan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0ca550e23940a3918fd7f42e9383ee188cbea9b5.1713687359.git.i@dan.games \
--to=i@dan.games \
--cc=70493@debbugs.gnu.org \
--cc=john.kehayias@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.