From 3054057943361c7110571c5492d6b10d3693ceb7 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Sat, 12 Dec 2020 13:00:56 -0500 Subject: [PATCH] protontricks: 1.4.2 -> 1.4.3 --- .../protontricks/default.nix | 9 +- .../protontricks/steam-run.patch | 97 +++++++++++++------ 2 files changed, 77 insertions(+), 29 deletions(-) diff --git a/pkgs/tools/package-management/protontricks/default.nix b/pkgs/tools/package-management/protontricks/default.nix index 17bf1ba2f11..2c630933658 100644 --- a/pkgs/tools/package-management/protontricks/default.nix +++ b/pkgs/tools/package-management/protontricks/default.nix @@ -11,13 +11,13 @@ buildPythonApplication rec { pname = "protontricks"; - version = "1.4.2"; + version = "1.4.3"; src = fetchFromGitHub { owner = "Matoking"; repo = pname; rev = version; - sha256 = "0ri4phi1rna9snrxa6gl23walyack09mgax7zpjqfpxivwls3ach"; + sha256 = "0a5727igwafwvj8rr5lv0lx8rlfji3qkzmrbp0d15w5dc4fhknp0"; }; patches = [ @@ -44,6 +44,11 @@ buildPythonApplication rec { disabledTests = [ # Steam runtime is hard-coded with steam-run.patch and can't be configured "test_run_steam_runtime_not_found" + "test_unknown_steam_runtime_detected" + + # Steam runtime 2 currently isn't supported + # See https://github.com/NixOS/nixpkgs/issues/100655 + "test_run_winetricks_steam_runtime_v2" ]; meta = with lib; { diff --git a/pkgs/tools/package-management/protontricks/steam-run.patch b/pkgs/tools/package-management/protontricks/steam-run.patch index 0728213dc7d..536072cafc4 100644 --- a/pkgs/tools/package-management/protontricks/steam-run.patch +++ b/pkgs/tools/package-management/protontricks/steam-run.patch @@ -66,10 +66,10 @@ index 6506dae..2f762c9 100755 # escaping it cwd=steam_app.install_path, diff --git a/src/protontricks/steam.py b/src/protontricks/steam.py -index 0d3670e..d01cabe 100644 +index 215b31d..aa545b8 100644 --- a/src/protontricks/steam.py +++ b/src/protontricks/steam.py -@@ -12,7 +12,7 @@ from .util import lower_dict +@@ -11,7 +11,7 @@ from .util import lower_dict __all__ = ( "COMMON_STEAM_DIRS", "SteamApp", "find_steam_path", @@ -78,7 +78,7 @@ index 0d3670e..d01cabe 100644 "find_appid_proton_prefix", "get_steam_lib_paths", "get_steam_apps", "get_custom_proton_installations" ) -@@ -207,38 +207,6 @@ def find_steam_path(): +@@ -245,37 +245,6 @@ def find_steam_path(): return None, None @@ -93,19 +93,18 @@ index 0d3670e..d01cabe 100644 - # User has disabled Steam Runtime - logger.info("STEAM_RUNTIME is 0. Disabling Steam Runtime.") - return None -- elif os.path.isdir(env_steam_runtime): +- elif env_steam_runtime and Path(env_steam_runtime).is_dir(): - # User has a custom Steam Runtime - logger.info( - "Using custom Steam Runtime at %s", env_steam_runtime) -- return env_steam_runtime +- return Path(env_steam_runtime) - elif env_steam_runtime in ["1", ""]: - # User has enabled Steam Runtime or doesn't have STEAM_RUNTIME set; - # default to enabled Steam Runtime in either case -- steam_runtime_path = os.path.join( -- steam_root, "ubuntu12_32", "steam-runtime") +- steam_runtime_path = steam_root / "ubuntu12_32" / "steam-runtime" - - logger.info( -- "Using default Steam Runtime at %s", steam_runtime_path) +- "Using default Steam Runtime at %s", str(steam_runtime_path)) - return steam_runtime_path - - logger.error( @@ -118,36 +117,77 @@ index 0d3670e..d01cabe 100644 APPINFO_STRUCT_SECTION = "