nixpkgs/pkgs/tools/package-management/protontricks/default.nix
Kira Bruneau 27f60ec4b8 protontricks: 1.4.4 -> 1.5.0
- Update steam-run.patch to support Pressure Vessel runtime
- Fix adding $PROTON_DIST_PATH/lib to LD_LIBRARY_PATH when using legacy runtime
- Use bash instead of /bin/sh now that wrappers are non-POSIX compliant
- Remove `test_run_steam_runtime_not_found` in steam-run.patch instead of using disabledTests
- Add import check
2021-04-25 13:08:06 -04:00

59 lines
1.3 KiB
Nix

{ lib
, buildPythonApplication
, fetchFromGitHub
, setuptools_scm
, vdf
, bash
, steam-run
, winetricks
, zenity
, pytestCheckHook
}:
buildPythonApplication rec {
pname = "protontricks";
version = "1.5.0";
src = fetchFromGitHub {
owner = "Matoking";
repo = pname;
rev = version;
hash = "sha256-IHgoi5VUN3ORbufkruPb6wR7pTekJFQHhhDrnjOWzWM=";
};
patches = [
# Use steam-run to run Proton binaries
./steam-run.patch
];
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
'';
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ vdf ];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [
bash
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
]}"
];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "protontricks" ];
meta = with lib; {
description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
homepage = "https://github.com/Matoking/protontricks";
license = licenses.gpl3;
maintainers = with maintainers; [ metadark ];
platforms = platforms.linux;
};
}