2019-11-07 14:38:33 +00:00
|
|
|
{ lib
|
2020-09-19 14:37:15 +01:00
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
2021-06-03 11:09:11 +01:00
|
|
|
, setuptools-scm
|
2020-09-19 14:37:15 +01:00
|
|
|
, vdf
|
2021-04-25 16:32:46 +01:00
|
|
|
, bash
|
2019-11-07 14:38:33 +00:00
|
|
|
, steam-run
|
2020-09-19 14:37:15 +01:00
|
|
|
, winetricks
|
|
|
|
, zenity
|
2019-11-07 14:38:33 +00:00
|
|
|
, pytestCheckHook
|
2019-07-13 04:03:35 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "protontricks";
|
2021-06-19 15:21:47 +01:00
|
|
|
version = "1.5.2";
|
2019-07-13 04:03:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Matoking";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-19 15:21:47 +01:00
|
|
|
hash = "sha256-Vmxb8SjPhcSqFzykHRPsLtAoSwomN+se+icwHkucbX8=";
|
2019-07-13 04:03:35 +01:00
|
|
|
};
|
|
|
|
|
2019-11-07 14:38:33 +00:00
|
|
|
patches = [
|
|
|
|
# Use steam-run to run Proton binaries
|
|
|
|
./steam-run.patch
|
|
|
|
];
|
2020-01-26 13:51:31 +00:00
|
|
|
|
2021-05-10 21:43:41 +01:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2021-06-03 11:09:11 +01:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2019-07-13 04:03:35 +01:00
|
|
|
propagatedBuildInputs = [ vdf ];
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
2019-11-07 14:38:33 +00:00
|
|
|
"--prefix PATH : ${lib.makeBinPath [
|
2021-04-25 16:32:46 +01:00
|
|
|
bash
|
2019-11-07 14:38:33 +00:00
|
|
|
steam-run
|
2020-12-13 15:13:36 +00:00
|
|
|
(winetricks.override {
|
|
|
|
# Remove default build of wine to reduce closure size.
|
|
|
|
# Falls back to wine in PATH when --no-runtime is passed.
|
|
|
|
wine = null;
|
|
|
|
})
|
2019-11-07 14:38:33 +00:00
|
|
|
zenity
|
|
|
|
]}"
|
2019-07-13 04:03:35 +01:00
|
|
|
];
|
|
|
|
|
2019-11-07 14:38:33 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2021-04-25 16:32:46 +01:00
|
|
|
pythonImportsCheck = [ "protontricks" ];
|
2020-01-26 13:51:31 +00:00
|
|
|
|
2019-11-07 14:38:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-13 04:03:35 +01:00
|
|
|
description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Matoking/protontricks";
|
2021-05-10 21:43:41 +01:00
|
|
|
license = licenses.gpl3Only;
|
2021-05-22 15:47:40 +01:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-09-19 14:37:15 +01:00
|
|
|
platforms = platforms.linux;
|
2019-07-13 04:03:35 +01:00
|
|
|
};
|
|
|
|
}
|