2021-01-05 17:05:55 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools_scm
|
|
|
|
, vdf
|
2021-05-03 20:48:10 +00:00
|
|
|
, bash
|
2021-01-05 17:05:55 +00:00
|
|
|
, steam-run
|
2020-09-25 04:45:31 +00:00
|
|
|
, winetricks
|
|
|
|
, zenity
|
2021-01-05 17:05:55 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "protontricks";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "1.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Matoking";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-20 23:08:51 +00:00
|
|
|
hash = "sha256-SrBPqGRIsP0+ZWDe96sqjqCpJoY3Sn3VoPpMw7ellC0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
patches = [
|
|
|
|
# Use steam-run to run Proton binaries
|
|
|
|
./steam-run.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
propagatedBuildInputs = [ vdf ];
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
2021-01-05 17:05:55 +00:00
|
|
|
"--prefix PATH : ${lib.makeBinPath [
|
2021-05-03 20:48:10 +00:00
|
|
|
bash
|
2021-01-05 17:05:55 +00:00
|
|
|
steam-run
|
|
|
|
(winetricks.override {
|
|
|
|
# Remove default build of wine to reduce closure size.
|
|
|
|
# Falls back to wine in PATH when --no-runtime is passed.
|
|
|
|
wine = null;
|
|
|
|
})
|
|
|
|
zenity
|
|
|
|
]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2021-05-03 20:48:10 +00:00
|
|
|
pythonImportsCheck = [ "protontricks" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
|
|
|
|
homepage = "https://github.com/Matoking/protontricks";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ metadark ];
|
2020-09-25 04:45:31 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|