From 4cf133db4d41b487ae5a2026af5d99a691f48360 Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Sun, 6 Aug 2023 10:00:47 -0700 Subject: [PATCH] Added proton GE as a steam compat tool --- modules/apps/steam/default.nix | 8 ++++++++ packages/proton-ge-custom/default.nix | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 packages/proton-ge-custom/default.nix diff --git a/modules/apps/steam/default.nix b/modules/apps/steam/default.nix index 97a0818..f7fd57f 100644 --- a/modules/apps/steam/default.nix +++ b/modules/apps/steam/default.nix @@ -24,5 +24,13 @@ in { driSupport = true; driSupport32Bit = true; }; + + # TODO: This can be removed when/if PR 189398 is merged + # https://github.com/NixOS/nixpkgs/pull/189398 + aa.home.extraOptions = { + home.sessionVariables = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "${pkgs.aa.proton-ge-custom}"; + }; + }; }; } diff --git a/packages/proton-ge-custom/default.nix b/packages/proton-ge-custom/default.nix new file mode 100644 index 0000000..c216afd --- /dev/null +++ b/packages/proton-ge-custom/default.nix @@ -0,0 +1,20 @@ +{ + stdenv, + lib, + fetchurl, + ... +}: +stdenv.mkDerivation rec { + pname = "proton-ge-custom"; + version = "GE-Proton8-11"; + + src = fetchurl { + url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${version}/${version}.tar.gz"; + sha256 = "sha256-ldJBwp/9Cjb5k9FBrc6iz4/rnMhU5Ayf35+kNTAvXCg="; + }; + + buildCommand = '' + mkdir -p $out + tar -C $out --strip=1 -x -f $src + ''; +}