2021-01-05 17:05:55 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2021-09-18 10:52:07 +00:00
|
|
|
, setuptools
|
2020-09-25 04:45:31 +00:00
|
|
|
, 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
|
2021-09-18 10:52:07 +00:00
|
|
|
, yad
|
2021-01-05 17:05:55 +00:00
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "protontricks";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Matoking";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-XC5ip12wlXRo/AaTFJWEZvEZPPC1WtXTyeYivvyHZaE=";
|
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;
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools # implicit dependency, used to find data/icon_placeholder.png
|
|
|
|
vdf
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
2021-09-18 10:52:07 +00:00
|
|
|
winetricks
|
|
|
|
yad
|
2021-01-05 17:05:55 +00:00
|
|
|
]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2021-09-18 10:52:07 +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-05-03 20:48:10 +00:00
|
|
|
pythonImportsCheck = [ "protontricks" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
|
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;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2021-09-18 10:52:07 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|