Skip to content

Commit

Permalink
Merge pull request #175 from Jovian-Experiments/gamescope-3.12.6
Browse files Browse the repository at this point in the history
gamescope: 3.12.5 -> 3.12.6
  • Loading branch information
K900 authored Oct 24, 2023
2 parents dee56fa + 12033ee commit 601fda9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkgs/gamescope-session/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ let
};
in stdenv.mkDerivation(finalAttrs: {
pname = "gamescope-session";
version = "3.12.5-1.3";
version = "3.12.6-1";

src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "PKGBUILDs-mirror";
rev = "jupiter-main/gamescope-${finalAttrs.version}";
hash = "sha256-kRXnhWhmoMewyozFAVfjBmuyTmOe9qF8JAs7VltNmHo=";
hash = "sha256-5LPqtSLZpfCMkTv5JgG4mK8M9yApSYivcTtNA/W03f8=";
};

patchPhase = ''
Expand Down
27 changes: 24 additions & 3 deletions pkgs/gamescope/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ gamescope'
, fetchpatch
, fetchFromGitHub
, substituteAll
, glm
, gbenchmark
}:
Expand All @@ -9,15 +10,23 @@
# version shipped by the vendor, ensuring feature level is equivalent.

let
version = "3.12.5";
hash = "sha256-u4pnKd5ZEC3CS3E2i8E8Wposd8Tu4ZUoQXFmr0runwE=";
version = "3.12.6";
hash = "sha256-xQPRUO7UivfdoVf2MWfRI6l2T8n+gGqhQyj068fr7Sg=";

joshShaders = fetchFromGitHub {
owner = "Joshua-Ashton";
repo = "GamescopeShaders";
rev = "v0.1";
hash = "sha256-gR1AeAHV/Kn4ntiEDUSPxASLMFusV6hgSGrTbMCBUZA=";
};
in
gamescope'.overrideAttrs({ buildInputs, ... }: {
gamescope'.overrideAttrs({ buildInputs, postPatch ? "", postInstall ? "", ... }: {
name = "gamescope-${version}";
src = fetchFromGitHub {
owner = "ValveSoftware";
repo = "gamescope";
rev = "refs/tags/${version}";
fetchSubmodules = true;
inherit hash;
};

Expand All @@ -27,10 +36,22 @@ gamescope'.overrideAttrs({ buildInputs, ... }: {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/770f6182ac3084eb9ed836e1f34fce0595c905db/pkgs/applications/window-managers/gamescope/use-pkgconfig.patch";
sha256 = "sha256-BqP20qoVH47xT/Pn4P9V5wUvHK/AJivam0Xenr8AbGk=";
})
./jovian.patch
];

# We can't substitute the patch itself because substituteAll is itself a derivation,
# so `placeholder "out"` ends up pointing to the wrong place
postPatch = ''
substituteInPlace src/reshade_effect_manager.cpp --replace "@out@" "$out"
'';

buildInputs = buildInputs ++ [
gbenchmark
glm
];

postInstall = postInstall + ''
mkdir -p $out/share/gamescope/reshade
cp -r ${joshShaders}/* $out/share/gamescope/reshade/
'';
})
13 changes: 13 additions & 0 deletions pkgs/gamescope/jovian.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/reshade_effect_manager.cpp b/src/reshade_effect_manager.cpp
index 3597ca1..de45250 100644
--- a/src/reshade_effect_manager.cpp
+++ b/src/reshade_effect_manager.cpp
@@ -34,7 +34,7 @@ static std::string GetLocalUsrDir()

static std::string GetUsrDir()
{
- return "/usr";
+ return "@out@";
}

static LogScope reshade_log("gamescope_reshade");

0 comments on commit 601fda9

Please sign in to comment.