about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorsuperherointj <5861043+superherointj@users.noreply.github.com>2023-03-13 19:19:28 -0300
committerGitHub <noreply@github.com>2023-03-13 19:19:28 -0300
commit9e91539bb454af74b2e8f012e1aae08cb8abd9ff (patch)
treef776b46e36bf3ae45af62c3ce04b0b411730d3ea /pkgs
parentdd5e6ec8b7f4c254af594da7f38fb1a5f87e89e5 (diff)
parent00398e923cefbb038b488019d1d6169c14693d88 (diff)
Merge pull request #219548 from Scrumplex/gamescope-3.11.52
gamescope: 3.11.49 -> 3.11.52-beta6
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/window-managers/gamescope/default.nix58
-rw-r--r--pkgs/development/libraries/libliftoff/default.nix6
-rw-r--r--pkgs/development/libraries/openvr/default.nix55
-rw-r--r--pkgs/top-level/all-packages.nix6
4 files changed, 117 insertions, 8 deletions
diff --git a/pkgs/applications/window-managers/gamescope/default.nix b/pkgs/applications/window-managers/gamescope/default.nix
index 7fdffc27f6526..20a6a59e0c8f4 100644
--- a/pkgs/applications/window-managers/gamescope/default.nix
+++ b/pkgs/applications/window-managers/gamescope/default.nix
@@ -1,11 +1,13 @@
 { stdenv
 , fetchFromGitHub
+, fetchpatch
 , meson
 , pkg-config
 , ninja
 , xorg
 , libdrm
 , vulkan-loader
+, vulkan-headers
 , wayland
 , wayland-protocols
 , libxkbcommon
@@ -18,15 +20,25 @@
 , seatd
 , xwayland
 , glslang
+, hwdata
+, openvr
 , stb
 , wlroots
 , libliftoff
+, libdisplay-info
 , lib
 , makeBinaryWrapper
 }:
 let
   pname = "gamescope";
-  version = "3.11.49";
+  version = "3.11.52-beta6";
+
+  vkroots = fetchFromGitHub {
+    owner = "Joshua-Ashton";
+    repo = "vkroots";
+    rev = "26757103dde8133bab432d172b8841df6bb48155";
+    sha256 = "sha256-eet+FMRO2aBQJcCPOKNKGuQv5oDIrgdVPRO00c5gkL0=";
+  };
 in
 stdenv.mkDerivation {
   inherit pname version;
@@ -35,10 +47,37 @@ stdenv.mkDerivation {
     owner = "Plagman";
     repo = "gamescope";
     rev = "refs/tags/${version}";
-    hash = "sha256-GRq/b013wFRHzFz2YCulJRtcwzX/dhJKd8dkATSLug0=";
+    hash = "sha256-2gn6VQfmwwl86mmnRh+J1uxSIpA5x/Papq578seJ3n8=";
   };
 
-  patches = [ ./use-pkgconfig.patch ];
+  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=";
+    })
+  ];
 
   nativeBuildInputs = [
     meson
@@ -56,9 +95,11 @@ stdenv.mkDerivation {
     xorg.libXtst
     xorg.libXres
     xorg.libXi
+    xorg.libXmu
     libdrm
     libliftoff
     vulkan-loader
+    vulkan-headers
     glslang
     SDL2
     wayland
@@ -73,8 +114,17 @@ stdenv.mkDerivation {
     pipewire
     libcap
     stb
+    hwdata
+    openvr
+    vkroots
+    libdisplay-info
   ];
 
+  postUnpack = ''
+    rm -rf source/subprojects/vkroots
+    ln -s ${vkroots} source/subprojects/vkroots
+  '';
+
   # --debug-layers flag expects these in the path
   postInstall = ''
     wrapProgram "$out/bin/gamescope" \
@@ -85,7 +135,7 @@ stdenv.mkDerivation {
     description = "SteamOS session compositing window manager";
     homepage = "https://github.com/Plagman/gamescope";
     license = licenses.bsd2;
-    maintainers = with maintainers; [ nrdxp zhaofengli ];
+    maintainers = with maintainers; [ nrdxp pedrohlc Scrumplex zhaofengli ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libliftoff/default.nix b/pkgs/development/libraries/libliftoff/default.nix
index fa0bc6d3d999a..e143473550600 100644
--- a/pkgs/development/libraries/libliftoff/default.nix
+++ b/pkgs/development/libraries/libliftoff/default.nix
@@ -5,14 +5,14 @@
 
 stdenv.mkDerivation rec {
   pname = "libliftoff";
-  version = "0.3.0";
+  version = "0.4.1";
 
   src = fetchFromGitLab {
     domain = "gitlab.freedesktop.org";
     owner = "emersion";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-MbXDUkAA9gY6Qb6Ok33MNuqIfb4bPIEHd1IVH/UmH10=";
+    sha256 = "sha256-NPwhsd6IOQ0XxNQQNdaaM4kmwoLftokV86WYhoa5csY=";
   };
 
   nativeBuildInputs = [ meson pkg-config ninja ];
@@ -30,6 +30,6 @@ stdenv.mkDerivation rec {
     changelog = "https://github.com/emersion/libliftoff/releases/tag/v${version}";
     license     = licenses.mit;
     platforms   = platforms.linux;
-    maintainers = with maintainers; [ primeos ];
+    maintainers = with maintainers; [ pedrohlc primeos Scrumplex ];
   };
 }
diff --git a/pkgs/development/libraries/openvr/default.nix b/pkgs/development/libraries/openvr/default.nix
new file mode 100644
index 0000000000000..23df943062d6e
--- /dev/null
+++ b/pkgs/development/libraries/openvr/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, cmake
+, libGL
+, jsoncpp
+, fetchFromGitHub
+, fetchpatch2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openvr";
+  version = "1.23.8";
+
+  src = fetchFromGitHub {
+    owner = "ValveSoftware";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-ZdL1HDRSpPykbV3M0CjCZkOt7XlF7Z7OAhOey2ALeHg=";
+  };
+
+  patches = [
+    # https://github.com/ValveSoftware/openvr/pull/594
+    (fetchpatch2 {
+      name = "use-correct-CPP11-definition-for-vsprintf_s.patch";
+      url = "https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch";
+      sha256 = "sha256-0sPNDx5qKqCzN35FfArbgJ0cTztQp+SMLsXICxneLx4=";
+    })
+    # https://github.com/ValveSoftware/openvr/pull/1716
+    (fetchpatch2 {
+      name = "add-ability-to-build-with-system-installed-jsoncpp.patch";
+      url = "https://github.com/ValveSoftware/openvr/commit/54a58e479f4d63e62e9118637cd92a2013a4fb95.patch";
+      sha256 = "sha256-aMojjbNjLvsGev0JaBx5sWuMv01sy2tG/S++I1NUi7U=";
+    })
+  ];
+
+  postUnpack = ''
+    # Move in-tree jsoncpp out to complement the patch above
+    # fetchpatch2 is not able to handle these renames
+    mkdir source/thirdparty
+    mv source/src/json source/thirdparty/jsoncpp
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ jsoncpp libGL ];
+
+  cmakeFlags = [ "-DUSE_SYSTEM_JSONCPP=ON" "-DBUILD_SHARED=1" ];
+
+  meta = with lib;{
+    homepage = "https://github.com/ValveSoftware/openvr";
+    description = "An API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ pedrohlc Scrumplex ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b1d8d295682a5..d9cb764fb1937 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1459,7 +1459,9 @@ with pkgs;
     libgamemode32 = pkgsi686Linux.gamemode.lib;
   };
 
-  gamescope = callPackage ../applications/window-managers/gamescope { };
+  gamescope = callPackage ../applications/window-managers/gamescope {
+    wlroots = wlroots_0_16;
+  };
 
   gay = callPackage ../tools/misc/gay {  };
 
@@ -22830,6 +22832,8 @@ with pkgs;
 
   openvdb = callPackage ../development/libraries/openvdb { };
 
+  openvr = callPackage ../development/libraries/openvr { };
+
   inherit (callPackages ../development/libraries/libressl { })
     libressl_3_4
     libressl_3_5