protontricks: 1.11.1 -> 1.12.0 (#343068)

This commit is contained in:
Sandro
2024-09-27 15:41:51 +02:00
committed by GitHub
3 changed files with 69 additions and 31 deletions
@@ -2,8 +2,10 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
mock,
pytestCheckHook,
nix-update-script,
}:
buildPythonPackage rec {
@@ -13,17 +15,30 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "ValvePython";
repo = pname;
rev = "v${version}";
repo = "vdf";
rev = "refs/tags/v${version}";
hash = "sha256-6ozglzZZNKDtADkHwxX2Zsnkh6BE8WbcRcC9HkTTgPU=";
};
patches = [
# Support appinfo.vdf v29 (required by protontricks 1.12.0)
(fetchpatch2 {
url = "https://github.com/Matoking/vdf/commit/981cad270c2558aeb8eccaf42cfcf9fabbbed199.patch";
hash = "sha256-kLAbbB0WHjxq4rokLoGTPx43BU44EshteR59Ey9JnXo=";
})
];
nativeCheckInputs = [
mock
pytestCheckHook
];
pythonImportsCheck = [ "vdf" ];
# Use nix-update-script instead of the default python updater
# The python updater requires GitHub releases, but vdf only uses tags
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Library for working with Valve's VDF text format";
homepage = "https://github.com/ValvePython/vdf";
@@ -1,29 +1,31 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, setuptools-scm
, setuptools
, vdf
, pillow
, substituteAll
, writeShellScript
, steam-run
, winetricks
, yad
, pytestCheckHook
, nix-update-script
, extraCompatPaths ? ""
{
lib,
buildPythonApplication,
fetchFromGitHub,
substituteAll,
writeShellScript,
steam-run,
fetchpatch2,
setuptools-scm,
setuptools,
vdf,
pillow,
winetricks,
yad,
pytestCheckHook,
nix-update-script,
extraCompatPaths ? "",
}:
buildPythonApplication rec {
pname = "protontricks";
version = "1.11.1";
version = "1.12.0";
src = fetchFromGitHub {
owner = "Matoking";
repo = pname;
rev = version;
sha256 = "sha256-a40IAFrzQ0mogMoXKb+Lp0fPc1glYophqtftigk3nAc=";
repo = "protontricks";
rev = "refs/tags/${version}";
hash = "sha256-dCb8mcwXoxD4abJjLEwk5tGp65XkvepmOX+Kc9Dl7fQ=";
};
patches = [
@@ -35,6 +37,19 @@ buildPythonApplication rec {
exec ${lib.getExe steam-run} bash "$@"
'';
})
# Revert vendored vdf since our vdf includes `appinfo.vdf` v29 support
(fetchpatch2 {
url = "https://github.com/Matoking/protontricks/commit/4198b7ea82369a91e3084d6e185f9b370f78eaec.patch";
revert = true;
hash = "sha256-1U/LiAliKtk3ygbIBsmoavXN0RSykiiegtml+bO8CnI=";
})
# Fix test_run_no_args test
(fetchpatch2 {
url = "https://github.com/Matoking/protontricks/commit/ff2381ad379a612e73f0d4604f1c9c3a012b3355.patch";
hash = "sha256-aiafLbiqS6TBBiQpfTYPVqhQs2OXYg/4yCtbuTv6Ug8=";
})
];
nativeBuildInputs = [ setuptools-scm ];
@@ -45,14 +60,18 @@ buildPythonApplication rec {
pillow
];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [
winetricks
yad
]}"
# Steam Runtime does not work outside of steam-run, so don't use it
"--set STEAM_RUNTIME 0"
] ++ lib.optional (extraCompatPaths != "") "--set STEAM_EXTRA_COMPAT_TOOLS_PATHS ${extraCompatPaths}";
makeWrapperArgs =
[
"--prefix PATH : ${
lib.makeBinPath [
winetricks
yad
]
}"
# Steam Runtime does not work outside of steam-run, so don't use it
"--set STEAM_RUNTIME 0"
]
++ lib.optional (extraCompatPaths != "") "--set STEAM_EXTRA_COMPAT_TOOLS_PATHS ${extraCompatPaths}";
nativeCheckInputs = [ pytestCheckHook ];
@@ -71,6 +90,9 @@ buildPythonApplication rec {
homepage = "https://github.com/Matoking/protontricks";
license = licenses.gpl3Only;
maintainers = with maintainers; [ kira-bruneau ];
platforms = [ "x86_64-linux" "i686-linux" ];
platforms = [
"x86_64-linux"
"i686-linux"
];
};
}
+2 -1
View File
@@ -35621,7 +35621,8 @@ with pkgs;
steamback = python311.pkgs.callPackage ../tools/games/steamback { };
protontricks = python3Packages.callPackage ../tools/package-management/protontricks {
inherit winetricks steam-run yad;
steam-run = steam-run-free;
inherit winetricks yad;
};
protonup-ng = with python3Packages; toPythonApplication protonup-ng;