2022-08-12 12:06:08 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, pkg-config
|
|
|
|
, ninja
|
|
|
|
, xorg
|
|
|
|
, libdrm
|
|
|
|
, vulkan-loader
|
2023-03-15 16:39:30 +00:00
|
|
|
, vulkan-headers
|
2022-08-12 12:06:08 +00:00
|
|
|
, wayland
|
2023-07-15 17:15:38 +00:00
|
|
|
, wayland-scanner
|
2022-08-12 12:06:08 +00:00
|
|
|
, wayland-protocols
|
|
|
|
, libxkbcommon
|
2023-07-15 17:15:38 +00:00
|
|
|
, glm
|
|
|
|
, gbenchmark
|
2022-08-12 12:06:08 +00:00
|
|
|
, libcap
|
|
|
|
, SDL2
|
|
|
|
, pipewire
|
|
|
|
, udev
|
|
|
|
, pixman
|
|
|
|
, libinput
|
2022-09-09 14:08:57 +00:00
|
|
|
, seatd
|
2022-08-12 12:06:08 +00:00
|
|
|
, xwayland
|
|
|
|
, glslang
|
2023-03-15 16:39:30 +00:00
|
|
|
, hwdata
|
|
|
|
, openvr
|
2022-08-12 12:06:08 +00:00
|
|
|
, stb
|
|
|
|
, wlroots
|
|
|
|
, libliftoff
|
2023-03-15 16:39:30 +00:00
|
|
|
, libdisplay-info
|
2022-08-12 12:06:08 +00:00
|
|
|
, lib
|
|
|
|
, makeBinaryWrapper
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "gamescope";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "3.12.0-beta10";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
vkroots = fetchFromGitHub {
|
|
|
|
owner = "Joshua-Ashton";
|
|
|
|
repo = "vkroots";
|
|
|
|
rev = "26757103dde8133bab432d172b8841df6bb48155";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-eet+FMRO2aBQJcCPOKNKGuQv5oDIrgdVPRO00c5gkL0=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-04-12 12:48:02 +00:00
|
|
|
owner = "ValveSoftware";
|
2022-08-12 12:06:08 +00:00
|
|
|
repo = "gamescope";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-31zGo22Z0+zQ81LmzI+Xif9eREzRpS0S9+nK1i/cBCY=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
patches = [
|
|
|
|
./use-pkgconfig.patch
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
pkg-config
|
|
|
|
ninja
|
2023-07-15 17:15:38 +00:00
|
|
|
wayland-scanner
|
|
|
|
glslang
|
2022-08-12 12:06:08 +00:00
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXxf86vm
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXres
|
|
|
|
xorg.libXi
|
2023-03-15 16:39:30 +00:00
|
|
|
xorg.libXmu
|
2022-08-12 12:06:08 +00:00
|
|
|
libdrm
|
|
|
|
libliftoff
|
|
|
|
vulkan-loader
|
2023-03-15 16:39:30 +00:00
|
|
|
vulkan-headers
|
2022-08-12 12:06:08 +00:00
|
|
|
SDL2
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
wlroots
|
|
|
|
xwayland
|
2022-09-09 14:08:57 +00:00
|
|
|
seatd
|
2022-08-12 12:06:08 +00:00
|
|
|
libinput
|
|
|
|
libxkbcommon
|
2023-07-15 17:15:38 +00:00
|
|
|
glm
|
|
|
|
gbenchmark
|
2022-08-12 12:06:08 +00:00
|
|
|
udev
|
|
|
|
pixman
|
|
|
|
pipewire
|
|
|
|
libcap
|
|
|
|
stb
|
2023-03-15 16:39:30 +00:00
|
|
|
hwdata
|
|
|
|
openvr
|
|
|
|
vkroots
|
|
|
|
libdisplay-info
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postUnpack = ''
|
|
|
|
rm -rf source/subprojects/vkroots
|
|
|
|
ln -s ${vkroots} source/subprojects/vkroots
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# --debug-layers flag expects these in the path
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/gamescope" \
|
|
|
|
--prefix PATH : ${with xorg; lib.makeBinPath [xprop xwininfo]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "SteamOS session compositing window manager";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/ValveSoftware/gamescope";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.bsd2;
|
2023-03-15 16:39:30 +00:00
|
|
|
maintainers = with maintainers; [ nrdxp pedrohlc Scrumplex zhaofengli ];
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|