2022-08-12 12:06:08 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, fetchpatch
|
2022-08-12 12:06:08 +00:00
|
|
|
, 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
|
|
|
|
, wayland-protocols
|
|
|
|
, libxkbcommon
|
|
|
|
, 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-03-15 16:39:30 +00:00
|
|
|
version = "3.11.52-beta6";
|
|
|
|
|
|
|
|
vkroots = fetchFromGitHub {
|
|
|
|
owner = "Joshua-Ashton";
|
|
|
|
repo = "vkroots";
|
|
|
|
rev = "26757103dde8133bab432d172b8841df6bb48155";
|
|
|
|
sha256 = "sha256-eet+FMRO2aBQJcCPOKNKGuQv5oDIrgdVPRO00c5gkL0=";
|
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Plagman";
|
|
|
|
repo = "gamescope";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-2gn6VQfmwwl86mmnRh+J1uxSIpA5x/Papq578seJ3n8=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
patches = [
|
|
|
|
./use-pkgconfig.patch
|
|
|
|
|
|
|
|
# https://github.com/Plagman/gamescope/pull/811
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-openvr-dependency-name.patch";
|
|
|
|
url = "https://github.com/Plagman/gamescope/commit/557e56badec7d4c56263d3463ca9cdb195e368d7.patch";
|
|
|
|
sha256 = "sha256-9Y1tJ24EsdtZEOCEA30+FJBrdzXX+Nj3nTb5kgcPfBE=";
|
|
|
|
})
|
|
|
|
# https://github.com/Plagman/gamescope/pull/813
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-openvr-include.patch";
|
|
|
|
url = "https://github.com/Plagman/gamescope/commit/1331b9f81ea4b3ae692a832ed85a464c3fd4c5e9.patch";
|
|
|
|
sha256 = "sha256-wDtFpM/nMcqSbIpR7K5Tyf0845r3l4kQHfwll1VL4Mc=";
|
|
|
|
})
|
|
|
|
# https://github.com/Plagman/gamescope/pull/812
|
|
|
|
(fetchpatch {
|
|
|
|
name = "bump-libdisplay-info-maximum-version.patch";
|
|
|
|
url = "https://github.com/Plagman/gamescope/commit/b430c5b9a05951755051fd4e41ce20496705fbbc.patch";
|
|
|
|
sha256 = "sha256-YHtwudMUHiE8i3ZbiC9gkSjrlS0/7ydjmJsY1a8ZI2E=";
|
|
|
|
})
|
|
|
|
# https://github.com/Plagman/gamescope/pull/824
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-libdisplay-info-pkgconfig-filename.patch";
|
|
|
|
url = "https://github.com/Plagman/gamescope/commit/5a672f09aa07c7c5d674789f3c685c8173e7a2cf.patch";
|
|
|
|
sha256 = "sha256-7NX54WIsJDvZT3C58N2FQasV9PJyKkJrLGYS1r4f+kc=";
|
|
|
|
})
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
pkg-config
|
|
|
|
ninja
|
|
|
|
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
|
|
|
glslang
|
|
|
|
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
|
|
|
|
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";
|
|
|
|
homepage = "https://github.com/Plagman/gamescope";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|