2019-11-07 14:38:33 +00:00
|
|
|
{ lib
|
2020-09-19 13:37:15 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
2021-06-03 10:09:11 +00:00
|
|
|
, setuptools-scm
|
2021-09-06 14:37:35 +00:00
|
|
|
, setuptools
|
2020-09-19 13:37:15 +00:00
|
|
|
, vdf
|
2024-01-09 07:03:23 +00:00
|
|
|
, pillow
|
|
|
|
, substituteAll
|
|
|
|
, writeShellScript
|
2019-11-07 14:38:33 +00:00
|
|
|
, steam-run
|
2020-09-19 13:37:15 +00:00
|
|
|
, winetricks
|
2021-09-06 14:37:35 +00:00
|
|
|
, yad
|
2019-11-07 14:38:33 +00:00
|
|
|
, pytestCheckHook
|
2021-12-01 04:14:55 +00:00
|
|
|
, nix-update-script
|
2019-07-13 03:03:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "protontricks";
|
2024-02-23 17:06:12 +00:00
|
|
|
version = "1.11.1";
|
2019-07-13 03:03:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Matoking";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-02-23 17:06:12 +00:00
|
|
|
sha256 = "sha256-a40IAFrzQ0mogMoXKb+Lp0fPc1glYophqtftigk3nAc=";
|
2019-07-13 03:03:35 +00:00
|
|
|
};
|
|
|
|
|
2019-11-07 14:38:33 +00:00
|
|
|
patches = [
|
|
|
|
# Use steam-run to run Proton binaries
|
2024-01-09 07:03:23 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./steam-run.patch;
|
|
|
|
steamRun = lib.getExe steam-run;
|
|
|
|
bash = writeShellScript "steam-run-bash" ''
|
|
|
|
exec ${lib.getExe steam-run} bash "$@"
|
|
|
|
'';
|
|
|
|
})
|
2019-11-07 14:38:33 +00:00
|
|
|
];
|
2020-01-26 13:51:31 +00:00
|
|
|
|
2021-06-03 10:09:11 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-09-06 14:37:35 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools # implicit dependency, used to find data/icon_placeholder.png
|
|
|
|
vdf
|
2024-01-09 07:03:23 +00:00
|
|
|
pillow
|
2021-09-06 14:37:35 +00:00
|
|
|
];
|
2019-07-13 03:03:35 +00:00
|
|
|
|
|
|
|
makeWrapperArgs = [
|
2019-11-07 14:38:33 +00:00
|
|
|
"--prefix PATH : ${lib.makeBinPath [
|
2021-09-06 14:37:35 +00:00
|
|
|
winetricks
|
|
|
|
yad
|
2019-11-07 14:38:33 +00:00
|
|
|
]}"
|
2024-01-09 07:03:23 +00:00
|
|
|
# Steam Runtime does not work outside of steam-run, so don't use it
|
|
|
|
"--set STEAM_RUNTIME 0"
|
2019-07-13 03:03:35 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-09-06 14:37:35 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
'';
|
|
|
|
|
2021-04-25 15:32:46 +00:00
|
|
|
pythonImportsCheck = [ "protontricks" ];
|
2020-01-26 13:51:31 +00:00
|
|
|
|
2022-12-25 22:11:14 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2021-12-01 04:14:55 +00:00
|
|
|
|
2019-11-07 14:38:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-13 03:03:35 +00:00
|
|
|
description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/Matoking/protontricks";
|
2021-05-10 20:43:41 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-05-22 14:47:40 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2021-09-06 14:37:35 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2019-07-13 03:03:35 +00:00
|
|
|
};
|
|
|
|
}
|