summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimothy DeHerrera <tim@nrdxp.dev>2022-07-16 19:23:16 -0700
committerTimothy DeHerrera <tim@nrdxp.dev>2022-08-08 17:32:13 -0600
commita3f954f99146a2502083cb7b2a72461556af58c7 (patch)
tree84765fbefc33a37c4f57a8751cad31a2f7ff8352
parent2e191eb7bd262c7235ec59af1c4151edc122b358 (diff)
downloadnixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.tar
nixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.tar.gz
nixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.tar.bz2
nixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.tar.lz
nixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.tar.xz
nixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.tar.zst
nixpkgs-a3f954f99146a2502083cb7b2a72461556af58c7.zip
gamescope init at 3.11.33-jupiter-3.3-2
-rw-r--r--pkgs/applications/window-managers/gamescope/default.nix91
-rw-r--r--pkgs/applications/window-managers/gamescope/use-pkgconfig.patch11
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 104 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/gamescope/default.nix b/pkgs/applications/window-managers/gamescope/default.nix
new file mode 100644
index 00000000000..2d271893b84
--- /dev/null
+++ b/pkgs/applications/window-managers/gamescope/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, fetchFromGitHub
+, meson
+, pkg-config
+, ninja
+, xorg
+, libdrm
+, vulkan-loader
+, wayland
+, wayland-protocols
+, libxkbcommon
+, libcap
+, SDL2
+, pipewire
+, udev
+, pixman
+, libinput
+, libseat
+, xwayland
+, glslang
+, stb
+, wlroots
+, libliftoff
+, lib
+, makeBinaryWrapper
+}:
+let
+  pname = "gamescope";
+  version = "3.11.33-jupiter-3.3-2";
+in
+stdenv.mkDerivation {
+  inherit pname version;
+
+  src = fetchFromGitHub {
+    owner = "Plagman";
+    repo = "gamescope";
+    rev = "refs/tags/${version}";
+    hash = "sha256-6/gTsQGZDQPCdmXe5EI9QcT/MkdTf6odsI2/+g/W7Qc=";
+  };
+
+  patches = [ ./use-pkgconfig.patch ];
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    makeBinaryWrapper
+  ];
+
+  buildInputs = [
+    xorg.libXdamage
+    xorg.libXcomposite
+    xorg.libXrender
+    xorg.libXext
+    xorg.libXxf86vm
+    xorg.libXtst
+    xorg.libXres
+    xorg.libXi
+    libdrm
+    libliftoff
+    vulkan-loader
+    glslang
+    SDL2
+    wayland
+    wayland-protocols
+    wlroots
+    xwayland
+    libseat
+    libinput
+    libxkbcommon
+    udev
+    pixman
+    pipewire
+    libcap
+    stb
+  ];
+
+  # --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;
+    maintainers = with maintainers; [ nrdxp ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/window-managers/gamescope/use-pkgconfig.patch b/pkgs/applications/window-managers/gamescope/use-pkgconfig.patch
new file mode 100644
index 00000000000..29345952433
--- /dev/null
+++ b/pkgs/applications/window-managers/gamescope/use-pkgconfig.patch
@@ -0,0 +1,11 @@
+diff --git a/meson.build b/meson.build
+index 1311784..77043ac 100644
+--- a/meson.build
++++ b/meson.build
+@@ -6,7 +6,6 @@ project(
+   default_options: [
+     'cpp_std=c++14',
+     'warning_level=2',
+-    'force_fallback_for=wlroots,libliftoff',
+   ],
+ )
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 49772490ff0..8feab753d22 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1185,6 +1185,8 @@ with pkgs;
     libgamemode32 = pkgsi686Linux.gamemode.lib;
   };
 
+  gamescope = callPackage ../applications/window-managers/gamescope { };
+
   gay = callPackage ../tools/misc/gay {  };
 
   elkhound = callPackage ../development/tools/elkhound { };