push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
{
lib,
buildPythonApplication,
fetchFromGitHub,
replaceVars,
writeShellScript,
steam-run,
fetchpatch2,
setuptools-scm,
vdf,
pillow,
winetricks,
yad,
pytestCheckHook,
nix-update-script,
extraCompatPaths ? "",
}:
buildPythonApplication rec {
pname = "protontricks";
version = "1.13.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Matoking";
repo = "protontricks";
tag = version;
hash = "sha256-6z6J31EBXf0FU3fWjjg3dX7OAOiN9Z3ONdKIweJiZBY=";
};
patches = [
# Use steam-run to run Proton binaries
(replaceVars ./steam-run.patch {
steamRun = lib.getExe steam-run;
bash = writeShellScript "steam-run-bash" ''
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=";
})
];
build-system = [ setuptools-scm ];
dependencies = [
vdf
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}";
nativeCheckInputs = [ pytestCheckHook ];
# From 1.6.0 release notes (https://github.com/Matoking/protontricks/releases/tag/1.6.0):
# In most cases the script is unnecessary and should be removed as part of the packaging process.
postInstall = ''
rm "$out/bin/protontricks-desktop-install"
'';
pythonImportsCheck = [ "protontricks" ];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Simple wrapper for running Winetricks commands for Proton-enabled games";
homepage = "https://github.com/Matoking/protontricks";
changelog = "https://github.com/Matoking/protontricks/blob/${src.tag}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ kira-bruneau ];
platforms = [
"x86_64-linux"
"i686-linux"
];
};
}

View File

@@ -0,0 +1,65 @@
diff --git a/src/protontricks/data/scripts/bwrap_launcher.sh b/src/protontricks/data/scripts/bwrap_launcher.sh
index 922c59d..54742a4 100644
--- a/src/protontricks/data/scripts/bwrap_launcher.sh
+++ b/src/protontricks/data/scripts/bwrap_launcher.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@
# Helper script
set -o errexit
diff --git a/src/protontricks/data/scripts/wine_launch.sh b/src/protontricks/data/scripts/wine_launch.sh
index 1b0a0ce..127f13e 100644
--- a/src/protontricks/data/scripts/wine_launch.sh
+++ b/src/protontricks/data/scripts/wine_launch.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@
# Helper script created by Protontricks to run Wine binaries using Steam Runtime
set -o errexit
diff --git a/src/protontricks/data/scripts/wineserver_keepalive.sh b/src/protontricks/data/scripts/wineserver_keepalive.sh
index 8168dae..cb3e7d9 100644
--- a/src/protontricks/data/scripts/wineserver_keepalive.sh
+++ b/src/protontricks/data/scripts/wineserver_keepalive.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@
# A simple keepalive script that will ensure a wineserver process is kept alive
# for the duration of the Protontricks session.
# This is accomplished by launching a simple Windows batch script that will
diff --git a/src/protontricks/util.py b/src/protontricks/util.py
index 0c7de98..afea7e4 100644
--- a/src/protontricks/util.py
+++ b/src/protontricks/util.py
@@ -99,7 +99,7 @@ def get_host_library_paths():
# Since that command is unavailable with newer Steam Runtime releases,
# do it ourselves here.
result = run(
- ["/sbin/ldconfig", "-XNv"],
+ ["@steamRun@", "/sbin/ldconfig", "-XNv"],
check=True, stdout=PIPE, stderr=PIPE
)
lines = result.stdout.decode("utf-8").split("\n")
diff --git a/tests/conftest.py b/tests/conftest.py
index fdb44ed..4758799 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -175,7 +175,7 @@ def steam_runtime_dir(steam_dir):
"""
(steam_dir.parent / "root" / "ubuntu12_32" / "steam-runtime").mkdir(parents=True)
(steam_dir.parent / "root" / "ubuntu12_32" / "steam-runtime" / "run.sh").write_text(
- "#!/bin/bash\n"
+ "#!/bin/sh\n"
"""if [ "$1" = "--print-steam-runtime-library-paths" ]; then\n"""
" echo 'fake_steam_runtime/lib:fake_steam_runtime/lib64'\n"
"fi"
@@ -768,7 +768,7 @@ def xdg_user_dir_bin(home_dir):
# Only mock PICTURES and DOWNLOAD; mocking everything isn't necessary
# for the tests.
(home_dir / ".local" / "bin" / "xdg-user-dir").write_text(
- '#!/bin/bash\n'
+ '#!/bin/sh\n'
'if [[ "$1" == "PICTURES" ]]; then\n'
' echo "$HOME/Pictures"\n'
'elif [[ "$1" == "DOWNLOAD" ]]; then\n'